React Native: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider









up vote
1
down vote

favorite












I've been getting this error every time I try to run my React Native app on the simulator (error via Logcat):



2018-11-09 12:26:59.314 23931-23931/? I/ncierge.androi: Rejecting re-init on previously-failed class java.lang.Class<com.google.firebase.auth.FirebaseAuth>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
2018-11-09 12:26:59.315 23931-23931/? I/ncierge.androi: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.internal.InternalAuthProvider" on path: DexPathList[[zip file "/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk"],nativeLibraryDirectories=[/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/lib/x86, /data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk!/lib/x86, /system/lib]]
2018-11-09 12:26:59.316 23931-23931/? I/ncierge.androi: Rejecting re-init on previously-failed class java.lang.Class<com.google.firebase.auth.FirebaseAuth>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
2018-11-09 12:26:59.317 23931-23931/? I/ncierge.androi: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.internal.InternalAuthProvider" on path: DexPathList[[zip file "/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk"],nativeLibraryDirectories=[/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/lib/x86, /data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk!/lib/x86, /system/lib]]
2018-11-09 12:26:59.325 23931-23931/? I/ncierge.androi: Rejecting re-init on previously-failed class java.lang.Class<com.google.firebase.auth.FirebaseAuth>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
2018-11-09 12:26:59.325 23931-23931/? I/ncierge.androi: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.internal.InternalAuthProvider" on path: DexPathList[[zip file "/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk"],nativeLibraryDirectories=[/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/lib/x86, /data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk!/lib/x86, /system/lib]]
2018-11-09 12:26:59.333 23931-23931/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.app.my.android, PID: 23931
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:453)
at java.lang.Class.forName(Class.java:378)
at com.google.firebase.components.Component$1.zzb(com.google.firebase:firebase-common@@16.0.2:1078)
at com.google.firebase.components.Component$1.zza(com.google.firebase:firebase-common@@16.0.2:1071)
at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@16.0.2:532)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:355)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:324)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:310)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@16.0.2:53)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1917)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1892)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@16.0.2:47)
at android.app.ActivityThread.installProvider(ActivityThread.java:6391)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853)
at android.app.ActivityThread.access$1100(ActivityThread.java:199)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.internal.InternalAuthProvider" on path: DexPathList[[zip file "/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk"],nativeLibraryDirectories=[/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/lib/x86, /data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk!/lib/x86, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at java.lang.Class.classForName(Native Method) 
at java.lang.Class.forName(Class.java:453) 
at java.lang.Class.forName(Class.java:378) 
at com.google.firebase.components.Component$1.zzb(com.google.firebase:firebase-common@@16.0.2:1078) 
at com.google.firebase.components.Component$1.zza(com.google.firebase:firebase-common@@16.0.2:1071) 
at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@16.0.2:532) 
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:355) 
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:324) 
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:310) 
at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@16.0.2:53) 
at android.content.ContentProvider.attachInfo(ContentProvider.java:1917) 
at android.content.ContentProvider.attachInfo(ContentProvider.java:1892) 
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@16.0.2:47) 
at android.app.ActivityThread.installProvider(ActivityThread.java:6391) 
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938) 
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853) 
at android.app.ActivityThread.access$1100(ActivityThread.java:199) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:193) 
at android.app.ActivityThread.main(ActivityThread.java:6669) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 


The app builds successfully when I run react-native run-android.



I'm using Firebase and I'm assuming that this must be some version conflict but I can't figure this out for anything. Any ideas?



/android/build.gradle



// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript
repositories
google()
jcenter()
maven url "https://maven.google.com"


dependencies
classpath 'com.android.tools.build:gradle:3.2.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:4.1.0'
classpath 'com.bugsnag:bugsnag-android-gradle-plugin:2.5.0'



allprojects

repositories
google()
mavenLocal()
jcenter()
maven
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"




subprojects
afterEvaluate project ->
if (project.hasProperty("android"))
android
compileSdkVersion 28
buildToolsVersion "28.0.3"






/android/app/build.gradle



buildscript 
repositories
maven url 'https://plugins.gradle.org/m2/'

dependencies
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.11.0, 0.99.99]'


apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'

repositories
maven url 'https://maven.google.com'


/**
* Original content
*/

apply plugin: "com.android.application"

import com.android.build.OutputFile

project.ext.react = [
entryFile: "index.js"
]

apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"

/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
* - An APK that only works on x86 devices
* The advantage is the size of the APK is reduced by about 4MB.
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
*/
def enableSeparateBuildPerCPUArchitecture = false

/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = false

android
compileSdkVersion 28
buildToolsVersion '28.0.3'
dexOptions
jumboMode true

defaultConfig
applicationId "com.app.my.android"
minSdkVersion 16
multiDexEnabled true
targetSdkVersion 28
versionCode 45
versionName "1.1.7"
ndk
abiFilters "armeabi-v7a", "x86"


manifestPlaceholders = [
onesignal_app_id: 'xxxxxxxx',
onesignal_google_project_number: 'REMOTE'
]


signingConfigs
release
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE'))
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD




splits
abi
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"


buildTypes
release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release


// applicationVariants are e.g. debug, release
applicationVariants.all variant ->
variant.outputs.each output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode





// apply plugin: 'com.bugsnag.android.gradle'
// plugins
// id "com.bugsnag.android.gradle" version "3.5.0"
//

dependencies
implementation(project(':react-native-code-push')) transitive = true
implementation(project(':bugsnag-react-native')) transitive = false
implementation(project(':react-native-onesignal')) transitive = false
implementation(project(':react-native-navigation')) transitive = false
implementation(project(':react-native-intercom')) transitive = false
implementation(project(':react-native-vector-icons')) transitive = false
implementation(project(':react-native-firebase')) transitive = false
api fileTree(dir: "libs", include: ['*.jar'])

implementation('com.android.support:appcompat-v7:28.0.0') transitive = true
implementation('com.facebook.react:react-native:0.57.1') transitive = true

// // React Native Navigation
implementation(project(':react-native-navigation')) transitive = false

// // Intercom
implementation(project(':react-native-intercom')) transitive = true

// // Firebase Cloud Messaging (For Intercom)
implementation('io.intercom.android:intercom-sdk-base:3.+') transitive = true
implementation('io.intercom.android:intercom-sdk-fcm:3.+') transitive = true

// Firebase dependencies
implementation('com.google.android.gms:play-services-base:16.0.1') transitive = false
implementation('com.google.firebase:firebase-core:16.0.4') transitive = false

implementation('com.google.firebase:firebase-messaging:17.3.3') transitive = false
implementation('com.google.firebase:firebase-firestore:17.1.1') transitive = false

implementation('com.google.firebase:firebase-auth:16.0.4') transitive = false
implementation('com.google.android.gms:play-services-auth:16.0.1') transitive = false


// OneSignal dependency
implementation('com.onesignal:OneSignal:[3.9.1, 3.99.99]') transitive = false

// Bugsnag
implementation('com.bugsnag:bugsnag-android:4.+') transitive = false


// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy)
from configurations.compile
into 'libs'


apply plugin: 'com.google.gms.google-services'


I looked everywhere but couldn't find anything about InternalAuthProvider or why it's failing. Any ideas?










share|improve this question

























    up vote
    1
    down vote

    favorite












    I've been getting this error every time I try to run my React Native app on the simulator (error via Logcat):



    2018-11-09 12:26:59.314 23931-23931/? I/ncierge.androi: Rejecting re-init on previously-failed class java.lang.Class<com.google.firebase.auth.FirebaseAuth>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
    2018-11-09 12:26:59.315 23931-23931/? I/ncierge.androi: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.internal.InternalAuthProvider" on path: DexPathList[[zip file "/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk"],nativeLibraryDirectories=[/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/lib/x86, /data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk!/lib/x86, /system/lib]]
    2018-11-09 12:26:59.316 23931-23931/? I/ncierge.androi: Rejecting re-init on previously-failed class java.lang.Class<com.google.firebase.auth.FirebaseAuth>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
    2018-11-09 12:26:59.317 23931-23931/? I/ncierge.androi: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.internal.InternalAuthProvider" on path: DexPathList[[zip file "/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk"],nativeLibraryDirectories=[/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/lib/x86, /data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk!/lib/x86, /system/lib]]
    2018-11-09 12:26:59.325 23931-23931/? I/ncierge.androi: Rejecting re-init on previously-failed class java.lang.Class<com.google.firebase.auth.FirebaseAuth>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
    2018-11-09 12:26:59.325 23931-23931/? I/ncierge.androi: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.internal.InternalAuthProvider" on path: DexPathList[[zip file "/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk"],nativeLibraryDirectories=[/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/lib/x86, /data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk!/lib/x86, /system/lib]]
    2018-11-09 12:26:59.333 23931-23931/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.app.my.android, PID: 23931
    java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
    at java.lang.Class.classForName(Native Method)
    at java.lang.Class.forName(Class.java:453)
    at java.lang.Class.forName(Class.java:378)
    at com.google.firebase.components.Component$1.zzb(com.google.firebase:firebase-common@@16.0.2:1078)
    at com.google.firebase.components.Component$1.zza(com.google.firebase:firebase-common@@16.0.2:1071)
    at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@16.0.2:532)
    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:355)
    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:324)
    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:310)
    at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@16.0.2:53)
    at android.content.ContentProvider.attachInfo(ContentProvider.java:1917)
    at android.content.ContentProvider.attachInfo(ContentProvider.java:1892)
    at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@16.0.2:47)
    at android.app.ActivityThread.installProvider(ActivityThread.java:6391)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853)
    at android.app.ActivityThread.access$1100(ActivityThread.java:199)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6669)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
    Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.internal.InternalAuthProvider" on path: DexPathList[[zip file "/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk"],nativeLibraryDirectories=[/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/lib/x86, /data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk!/lib/x86, /system/lib]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    at java.lang.Class.classForName(Native Method) 
    at java.lang.Class.forName(Class.java:453) 
    at java.lang.Class.forName(Class.java:378) 
    at com.google.firebase.components.Component$1.zzb(com.google.firebase:firebase-common@@16.0.2:1078) 
    at com.google.firebase.components.Component$1.zza(com.google.firebase:firebase-common@@16.0.2:1071) 
    at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@16.0.2:532) 
    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:355) 
    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:324) 
    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:310) 
    at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@16.0.2:53) 
    at android.content.ContentProvider.attachInfo(ContentProvider.java:1917) 
    at android.content.ContentProvider.attachInfo(ContentProvider.java:1892) 
    at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@16.0.2:47) 
    at android.app.ActivityThread.installProvider(ActivityThread.java:6391) 
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938) 
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853) 
    at android.app.ActivityThread.access$1100(ActivityThread.java:199) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650) 
    at android.os.Handler.dispatchMessage(Handler.java:106) 
    at android.os.Looper.loop(Looper.java:193) 
    at android.app.ActivityThread.main(ActivityThread.java:6669) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 


    The app builds successfully when I run react-native run-android.



    I'm using Firebase and I'm assuming that this must be some version conflict but I can't figure this out for anything. Any ideas?



    /android/build.gradle



    // Top-level build file where you can add configuration options common to all sub-projects/modules.

    buildscript
    repositories
    google()
    jcenter()
    maven url "https://maven.google.com"


    dependencies
    classpath 'com.android.tools.build:gradle:3.2.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    classpath 'com.google.gms:google-services:4.1.0'
    classpath 'com.bugsnag:bugsnag-android-gradle-plugin:2.5.0'



    allprojects

    repositories
    google()
    mavenLocal()
    jcenter()
    maven
    // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
    url "$rootDir/../node_modules/react-native/android"




    subprojects
    afterEvaluate project ->
    if (project.hasProperty("android"))
    android
    compileSdkVersion 28
    buildToolsVersion "28.0.3"






    /android/app/build.gradle



    buildscript 
    repositories
    maven url 'https://plugins.gradle.org/m2/'

    dependencies
    classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.11.0, 0.99.99]'


    apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'

    repositories
    maven url 'https://maven.google.com'


    /**
    * Original content
    */

    apply plugin: "com.android.application"

    import com.android.build.OutputFile

    project.ext.react = [
    entryFile: "index.js"
    ]

    apply from: "../../node_modules/react-native/react.gradle"
    apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"

    /**
    * Set this to true to create two separate APKs instead of one:
    * - An APK that only works on ARM devices
    * - An APK that only works on x86 devices
    * The advantage is the size of the APK is reduced by about 4MB.
    * Upload all the APKs to the Play Store and people will download
    * the correct one based on the CPU architecture of their device.
    */
    def enableSeparateBuildPerCPUArchitecture = false

    /**
    * Run Proguard to shrink the Java bytecode in release builds.
    */
    def enableProguardInReleaseBuilds = false

    android
    compileSdkVersion 28
    buildToolsVersion '28.0.3'
    dexOptions
    jumboMode true

    defaultConfig
    applicationId "com.app.my.android"
    minSdkVersion 16
    multiDexEnabled true
    targetSdkVersion 28
    versionCode 45
    versionName "1.1.7"
    ndk
    abiFilters "armeabi-v7a", "x86"


    manifestPlaceholders = [
    onesignal_app_id: 'xxxxxxxx',
    onesignal_google_project_number: 'REMOTE'
    ]


    signingConfigs
    release
    if (project.hasProperty('MYAPP_RELEASE_STORE_FILE'))
    storeFile file(MYAPP_RELEASE_STORE_FILE)
    storePassword MYAPP_RELEASE_STORE_PASSWORD
    keyAlias MYAPP_RELEASE_KEY_ALIAS
    keyPassword MYAPP_RELEASE_KEY_PASSWORD




    splits
    abi
    reset()
    enable enableSeparateBuildPerCPUArchitecture
    universalApk false // If true, also generate a universal APK
    include "armeabi-v7a", "x86"


    buildTypes
    release
    minifyEnabled enableProguardInReleaseBuilds
    proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
    signingConfig signingConfigs.release


    // applicationVariants are e.g. debug, release
    applicationVariants.all variant ->
    variant.outputs.each output ->
    // For each separate APK per architecture, set a unique version code as described here:
    // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
    def versionCodes = ["armeabi-v7a":1, "x86":2]
    def abi = output.getFilter(OutputFile.ABI)
    if (abi != null) // null for the universal-debug, universal-release variants
    output.versionCodeOverride =
    versionCodes.get(abi) * 1048576 + defaultConfig.versionCode





    // apply plugin: 'com.bugsnag.android.gradle'
    // plugins
    // id "com.bugsnag.android.gradle" version "3.5.0"
    //

    dependencies
    implementation(project(':react-native-code-push')) transitive = true
    implementation(project(':bugsnag-react-native')) transitive = false
    implementation(project(':react-native-onesignal')) transitive = false
    implementation(project(':react-native-navigation')) transitive = false
    implementation(project(':react-native-intercom')) transitive = false
    implementation(project(':react-native-vector-icons')) transitive = false
    implementation(project(':react-native-firebase')) transitive = false
    api fileTree(dir: "libs", include: ['*.jar'])

    implementation('com.android.support:appcompat-v7:28.0.0') transitive = true
    implementation('com.facebook.react:react-native:0.57.1') transitive = true

    // // React Native Navigation
    implementation(project(':react-native-navigation')) transitive = false

    // // Intercom
    implementation(project(':react-native-intercom')) transitive = true

    // // Firebase Cloud Messaging (For Intercom)
    implementation('io.intercom.android:intercom-sdk-base:3.+') transitive = true
    implementation('io.intercom.android:intercom-sdk-fcm:3.+') transitive = true

    // Firebase dependencies
    implementation('com.google.android.gms:play-services-base:16.0.1') transitive = false
    implementation('com.google.firebase:firebase-core:16.0.4') transitive = false

    implementation('com.google.firebase:firebase-messaging:17.3.3') transitive = false
    implementation('com.google.firebase:firebase-firestore:17.1.1') transitive = false

    implementation('com.google.firebase:firebase-auth:16.0.4') transitive = false
    implementation('com.google.android.gms:play-services-auth:16.0.1') transitive = false


    // OneSignal dependency
    implementation('com.onesignal:OneSignal:[3.9.1, 3.99.99]') transitive = false

    // Bugsnag
    implementation('com.bugsnag:bugsnag-android:4.+') transitive = false


    // Run this once to be able to run the application with BUCK
    // puts all compile dependencies into folder libs for BUCK to use
    task copyDownloadableDepsToLibs(type: Copy)
    from configurations.compile
    into 'libs'


    apply plugin: 'com.google.gms.google-services'


    I looked everywhere but couldn't find anything about InternalAuthProvider or why it's failing. Any ideas?










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I've been getting this error every time I try to run my React Native app on the simulator (error via Logcat):



      2018-11-09 12:26:59.314 23931-23931/? I/ncierge.androi: Rejecting re-init on previously-failed class java.lang.Class<com.google.firebase.auth.FirebaseAuth>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
      2018-11-09 12:26:59.315 23931-23931/? I/ncierge.androi: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.internal.InternalAuthProvider" on path: DexPathList[[zip file "/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk"],nativeLibraryDirectories=[/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/lib/x86, /data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk!/lib/x86, /system/lib]]
      2018-11-09 12:26:59.316 23931-23931/? I/ncierge.androi: Rejecting re-init on previously-failed class java.lang.Class<com.google.firebase.auth.FirebaseAuth>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
      2018-11-09 12:26:59.317 23931-23931/? I/ncierge.androi: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.internal.InternalAuthProvider" on path: DexPathList[[zip file "/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk"],nativeLibraryDirectories=[/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/lib/x86, /data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk!/lib/x86, /system/lib]]
      2018-11-09 12:26:59.325 23931-23931/? I/ncierge.androi: Rejecting re-init on previously-failed class java.lang.Class<com.google.firebase.auth.FirebaseAuth>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
      2018-11-09 12:26:59.325 23931-23931/? I/ncierge.androi: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.internal.InternalAuthProvider" on path: DexPathList[[zip file "/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk"],nativeLibraryDirectories=[/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/lib/x86, /data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk!/lib/x86, /system/lib]]
      2018-11-09 12:26:59.333 23931-23931/? E/AndroidRuntime: FATAL EXCEPTION: main
      Process: com.app.my.android, PID: 23931
      java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
      at java.lang.Class.classForName(Native Method)
      at java.lang.Class.forName(Class.java:453)
      at java.lang.Class.forName(Class.java:378)
      at com.google.firebase.components.Component$1.zzb(com.google.firebase:firebase-common@@16.0.2:1078)
      at com.google.firebase.components.Component$1.zza(com.google.firebase:firebase-common@@16.0.2:1071)
      at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@16.0.2:532)
      at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:355)
      at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:324)
      at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:310)
      at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@16.0.2:53)
      at android.content.ContentProvider.attachInfo(ContentProvider.java:1917)
      at android.content.ContentProvider.attachInfo(ContentProvider.java:1892)
      at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@16.0.2:47)
      at android.app.ActivityThread.installProvider(ActivityThread.java:6391)
      at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938)
      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853)
      at android.app.ActivityThread.access$1100(ActivityThread.java:199)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
      at android.os.Handler.dispatchMessage(Handler.java:106)
      at android.os.Looper.loop(Looper.java:193)
      at android.app.ActivityThread.main(ActivityThread.java:6669)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
      Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.internal.InternalAuthProvider" on path: DexPathList[[zip file "/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk"],nativeLibraryDirectories=[/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/lib/x86, /data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk!/lib/x86, /system/lib]]
      at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
      at java.lang.Class.classForName(Native Method) 
      at java.lang.Class.forName(Class.java:453) 
      at java.lang.Class.forName(Class.java:378) 
      at com.google.firebase.components.Component$1.zzb(com.google.firebase:firebase-common@@16.0.2:1078) 
      at com.google.firebase.components.Component$1.zza(com.google.firebase:firebase-common@@16.0.2:1071) 
      at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@16.0.2:532) 
      at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:355) 
      at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:324) 
      at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:310) 
      at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@16.0.2:53) 
      at android.content.ContentProvider.attachInfo(ContentProvider.java:1917) 
      at android.content.ContentProvider.attachInfo(ContentProvider.java:1892) 
      at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@16.0.2:47) 
      at android.app.ActivityThread.installProvider(ActivityThread.java:6391) 
      at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938) 
      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853) 
      at android.app.ActivityThread.access$1100(ActivityThread.java:199) 
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650) 
      at android.os.Handler.dispatchMessage(Handler.java:106) 
      at android.os.Looper.loop(Looper.java:193) 
      at android.app.ActivityThread.main(ActivityThread.java:6669) 
      at java.lang.reflect.Method.invoke(Native Method) 
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 


      The app builds successfully when I run react-native run-android.



      I'm using Firebase and I'm assuming that this must be some version conflict but I can't figure this out for anything. Any ideas?



      /android/build.gradle



      // Top-level build file where you can add configuration options common to all sub-projects/modules.

      buildscript
      repositories
      google()
      jcenter()
      maven url "https://maven.google.com"


      dependencies
      classpath 'com.android.tools.build:gradle:3.2.0'

      // NOTE: Do not place your application dependencies here; they belong
      // in the individual module build.gradle files
      classpath 'com.google.gms:google-services:4.1.0'
      classpath 'com.bugsnag:bugsnag-android-gradle-plugin:2.5.0'



      allprojects

      repositories
      google()
      mavenLocal()
      jcenter()
      maven
      // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
      url "$rootDir/../node_modules/react-native/android"




      subprojects
      afterEvaluate project ->
      if (project.hasProperty("android"))
      android
      compileSdkVersion 28
      buildToolsVersion "28.0.3"






      /android/app/build.gradle



      buildscript 
      repositories
      maven url 'https://plugins.gradle.org/m2/'

      dependencies
      classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.11.0, 0.99.99]'


      apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'

      repositories
      maven url 'https://maven.google.com'


      /**
      * Original content
      */

      apply plugin: "com.android.application"

      import com.android.build.OutputFile

      project.ext.react = [
      entryFile: "index.js"
      ]

      apply from: "../../node_modules/react-native/react.gradle"
      apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"

      /**
      * Set this to true to create two separate APKs instead of one:
      * - An APK that only works on ARM devices
      * - An APK that only works on x86 devices
      * The advantage is the size of the APK is reduced by about 4MB.
      * Upload all the APKs to the Play Store and people will download
      * the correct one based on the CPU architecture of their device.
      */
      def enableSeparateBuildPerCPUArchitecture = false

      /**
      * Run Proguard to shrink the Java bytecode in release builds.
      */
      def enableProguardInReleaseBuilds = false

      android
      compileSdkVersion 28
      buildToolsVersion '28.0.3'
      dexOptions
      jumboMode true

      defaultConfig
      applicationId "com.app.my.android"
      minSdkVersion 16
      multiDexEnabled true
      targetSdkVersion 28
      versionCode 45
      versionName "1.1.7"
      ndk
      abiFilters "armeabi-v7a", "x86"


      manifestPlaceholders = [
      onesignal_app_id: 'xxxxxxxx',
      onesignal_google_project_number: 'REMOTE'
      ]


      signingConfigs
      release
      if (project.hasProperty('MYAPP_RELEASE_STORE_FILE'))
      storeFile file(MYAPP_RELEASE_STORE_FILE)
      storePassword MYAPP_RELEASE_STORE_PASSWORD
      keyAlias MYAPP_RELEASE_KEY_ALIAS
      keyPassword MYAPP_RELEASE_KEY_PASSWORD




      splits
      abi
      reset()
      enable enableSeparateBuildPerCPUArchitecture
      universalApk false // If true, also generate a universal APK
      include "armeabi-v7a", "x86"


      buildTypes
      release
      minifyEnabled enableProguardInReleaseBuilds
      proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
      signingConfig signingConfigs.release


      // applicationVariants are e.g. debug, release
      applicationVariants.all variant ->
      variant.outputs.each output ->
      // For each separate APK per architecture, set a unique version code as described here:
      // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
      def versionCodes = ["armeabi-v7a":1, "x86":2]
      def abi = output.getFilter(OutputFile.ABI)
      if (abi != null) // null for the universal-debug, universal-release variants
      output.versionCodeOverride =
      versionCodes.get(abi) * 1048576 + defaultConfig.versionCode





      // apply plugin: 'com.bugsnag.android.gradle'
      // plugins
      // id "com.bugsnag.android.gradle" version "3.5.0"
      //

      dependencies
      implementation(project(':react-native-code-push')) transitive = true
      implementation(project(':bugsnag-react-native')) transitive = false
      implementation(project(':react-native-onesignal')) transitive = false
      implementation(project(':react-native-navigation')) transitive = false
      implementation(project(':react-native-intercom')) transitive = false
      implementation(project(':react-native-vector-icons')) transitive = false
      implementation(project(':react-native-firebase')) transitive = false
      api fileTree(dir: "libs", include: ['*.jar'])

      implementation('com.android.support:appcompat-v7:28.0.0') transitive = true
      implementation('com.facebook.react:react-native:0.57.1') transitive = true

      // // React Native Navigation
      implementation(project(':react-native-navigation')) transitive = false

      // // Intercom
      implementation(project(':react-native-intercom')) transitive = true

      // // Firebase Cloud Messaging (For Intercom)
      implementation('io.intercom.android:intercom-sdk-base:3.+') transitive = true
      implementation('io.intercom.android:intercom-sdk-fcm:3.+') transitive = true

      // Firebase dependencies
      implementation('com.google.android.gms:play-services-base:16.0.1') transitive = false
      implementation('com.google.firebase:firebase-core:16.0.4') transitive = false

      implementation('com.google.firebase:firebase-messaging:17.3.3') transitive = false
      implementation('com.google.firebase:firebase-firestore:17.1.1') transitive = false

      implementation('com.google.firebase:firebase-auth:16.0.4') transitive = false
      implementation('com.google.android.gms:play-services-auth:16.0.1') transitive = false


      // OneSignal dependency
      implementation('com.onesignal:OneSignal:[3.9.1, 3.99.99]') transitive = false

      // Bugsnag
      implementation('com.bugsnag:bugsnag-android:4.+') transitive = false


      // Run this once to be able to run the application with BUCK
      // puts all compile dependencies into folder libs for BUCK to use
      task copyDownloadableDepsToLibs(type: Copy)
      from configurations.compile
      into 'libs'


      apply plugin: 'com.google.gms.google-services'


      I looked everywhere but couldn't find anything about InternalAuthProvider or why it's failing. Any ideas?










      share|improve this question













      I've been getting this error every time I try to run my React Native app on the simulator (error via Logcat):



      2018-11-09 12:26:59.314 23931-23931/? I/ncierge.androi: Rejecting re-init on previously-failed class java.lang.Class<com.google.firebase.auth.FirebaseAuth>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
      2018-11-09 12:26:59.315 23931-23931/? I/ncierge.androi: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.internal.InternalAuthProvider" on path: DexPathList[[zip file "/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk"],nativeLibraryDirectories=[/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/lib/x86, /data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk!/lib/x86, /system/lib]]
      2018-11-09 12:26:59.316 23931-23931/? I/ncierge.androi: Rejecting re-init on previously-failed class java.lang.Class<com.google.firebase.auth.FirebaseAuth>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
      2018-11-09 12:26:59.317 23931-23931/? I/ncierge.androi: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.internal.InternalAuthProvider" on path: DexPathList[[zip file "/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk"],nativeLibraryDirectories=[/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/lib/x86, /data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk!/lib/x86, /system/lib]]
      2018-11-09 12:26:59.325 23931-23931/? I/ncierge.androi: Rejecting re-init on previously-failed class java.lang.Class<com.google.firebase.auth.FirebaseAuth>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
      2018-11-09 12:26:59.325 23931-23931/? I/ncierge.androi: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.internal.InternalAuthProvider" on path: DexPathList[[zip file "/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk"],nativeLibraryDirectories=[/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/lib/x86, /data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk!/lib/x86, /system/lib]]
      2018-11-09 12:26:59.333 23931-23931/? E/AndroidRuntime: FATAL EXCEPTION: main
      Process: com.app.my.android, PID: 23931
      java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
      at java.lang.Class.classForName(Native Method)
      at java.lang.Class.forName(Class.java:453)
      at java.lang.Class.forName(Class.java:378)
      at com.google.firebase.components.Component$1.zzb(com.google.firebase:firebase-common@@16.0.2:1078)
      at com.google.firebase.components.Component$1.zza(com.google.firebase:firebase-common@@16.0.2:1071)
      at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@16.0.2:532)
      at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:355)
      at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:324)
      at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:310)
      at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@16.0.2:53)
      at android.content.ContentProvider.attachInfo(ContentProvider.java:1917)
      at android.content.ContentProvider.attachInfo(ContentProvider.java:1892)
      at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@16.0.2:47)
      at android.app.ActivityThread.installProvider(ActivityThread.java:6391)
      at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938)
      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853)
      at android.app.ActivityThread.access$1100(ActivityThread.java:199)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
      at android.os.Handler.dispatchMessage(Handler.java:106)
      at android.os.Looper.loop(Looper.java:193)
      at android.app.ActivityThread.main(ActivityThread.java:6669)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
      Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.auth.internal.InternalAuthProvider" on path: DexPathList[[zip file "/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk"],nativeLibraryDirectories=[/data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/lib/x86, /data/app/com.app.my.android-y0_4S6bhT6Xc-ZEjkny9lw==/base.apk!/lib/x86, /system/lib]]
      at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
      at java.lang.Class.classForName(Native Method) 
      at java.lang.Class.forName(Class.java:453) 
      at java.lang.Class.forName(Class.java:378) 
      at com.google.firebase.components.Component$1.zzb(com.google.firebase:firebase-common@@16.0.2:1078) 
      at com.google.firebase.components.Component$1.zza(com.google.firebase:firebase-common@@16.0.2:1071) 
      at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@16.0.2:532) 
      at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:355) 
      at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:324) 
      at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.0.2:310) 
      at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@16.0.2:53) 
      at android.content.ContentProvider.attachInfo(ContentProvider.java:1917) 
      at android.content.ContentProvider.attachInfo(ContentProvider.java:1892) 
      at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@16.0.2:47) 
      at android.app.ActivityThread.installProvider(ActivityThread.java:6391) 
      at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938) 
      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853) 
      at android.app.ActivityThread.access$1100(ActivityThread.java:199) 
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650) 
      at android.os.Handler.dispatchMessage(Handler.java:106) 
      at android.os.Looper.loop(Looper.java:193) 
      at android.app.ActivityThread.main(ActivityThread.java:6669) 
      at java.lang.reflect.Method.invoke(Native Method) 
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 


      The app builds successfully when I run react-native run-android.



      I'm using Firebase and I'm assuming that this must be some version conflict but I can't figure this out for anything. Any ideas?



      /android/build.gradle



      // Top-level build file where you can add configuration options common to all sub-projects/modules.

      buildscript
      repositories
      google()
      jcenter()
      maven url "https://maven.google.com"


      dependencies
      classpath 'com.android.tools.build:gradle:3.2.0'

      // NOTE: Do not place your application dependencies here; they belong
      // in the individual module build.gradle files
      classpath 'com.google.gms:google-services:4.1.0'
      classpath 'com.bugsnag:bugsnag-android-gradle-plugin:2.5.0'



      allprojects

      repositories
      google()
      mavenLocal()
      jcenter()
      maven
      // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
      url "$rootDir/../node_modules/react-native/android"




      subprojects
      afterEvaluate project ->
      if (project.hasProperty("android"))
      android
      compileSdkVersion 28
      buildToolsVersion "28.0.3"






      /android/app/build.gradle



      buildscript 
      repositories
      maven url 'https://plugins.gradle.org/m2/'

      dependencies
      classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.11.0, 0.99.99]'


      apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'

      repositories
      maven url 'https://maven.google.com'


      /**
      * Original content
      */

      apply plugin: "com.android.application"

      import com.android.build.OutputFile

      project.ext.react = [
      entryFile: "index.js"
      ]

      apply from: "../../node_modules/react-native/react.gradle"
      apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"

      /**
      * Set this to true to create two separate APKs instead of one:
      * - An APK that only works on ARM devices
      * - An APK that only works on x86 devices
      * The advantage is the size of the APK is reduced by about 4MB.
      * Upload all the APKs to the Play Store and people will download
      * the correct one based on the CPU architecture of their device.
      */
      def enableSeparateBuildPerCPUArchitecture = false

      /**
      * Run Proguard to shrink the Java bytecode in release builds.
      */
      def enableProguardInReleaseBuilds = false

      android
      compileSdkVersion 28
      buildToolsVersion '28.0.3'
      dexOptions
      jumboMode true

      defaultConfig
      applicationId "com.app.my.android"
      minSdkVersion 16
      multiDexEnabled true
      targetSdkVersion 28
      versionCode 45
      versionName "1.1.7"
      ndk
      abiFilters "armeabi-v7a", "x86"


      manifestPlaceholders = [
      onesignal_app_id: 'xxxxxxxx',
      onesignal_google_project_number: 'REMOTE'
      ]


      signingConfigs
      release
      if (project.hasProperty('MYAPP_RELEASE_STORE_FILE'))
      storeFile file(MYAPP_RELEASE_STORE_FILE)
      storePassword MYAPP_RELEASE_STORE_PASSWORD
      keyAlias MYAPP_RELEASE_KEY_ALIAS
      keyPassword MYAPP_RELEASE_KEY_PASSWORD




      splits
      abi
      reset()
      enable enableSeparateBuildPerCPUArchitecture
      universalApk false // If true, also generate a universal APK
      include "armeabi-v7a", "x86"


      buildTypes
      release
      minifyEnabled enableProguardInReleaseBuilds
      proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
      signingConfig signingConfigs.release


      // applicationVariants are e.g. debug, release
      applicationVariants.all variant ->
      variant.outputs.each output ->
      // For each separate APK per architecture, set a unique version code as described here:
      // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
      def versionCodes = ["armeabi-v7a":1, "x86":2]
      def abi = output.getFilter(OutputFile.ABI)
      if (abi != null) // null for the universal-debug, universal-release variants
      output.versionCodeOverride =
      versionCodes.get(abi) * 1048576 + defaultConfig.versionCode





      // apply plugin: 'com.bugsnag.android.gradle'
      // plugins
      // id "com.bugsnag.android.gradle" version "3.5.0"
      //

      dependencies
      implementation(project(':react-native-code-push')) transitive = true
      implementation(project(':bugsnag-react-native')) transitive = false
      implementation(project(':react-native-onesignal')) transitive = false
      implementation(project(':react-native-navigation')) transitive = false
      implementation(project(':react-native-intercom')) transitive = false
      implementation(project(':react-native-vector-icons')) transitive = false
      implementation(project(':react-native-firebase')) transitive = false
      api fileTree(dir: "libs", include: ['*.jar'])

      implementation('com.android.support:appcompat-v7:28.0.0') transitive = true
      implementation('com.facebook.react:react-native:0.57.1') transitive = true

      // // React Native Navigation
      implementation(project(':react-native-navigation')) transitive = false

      // // Intercom
      implementation(project(':react-native-intercom')) transitive = true

      // // Firebase Cloud Messaging (For Intercom)
      implementation('io.intercom.android:intercom-sdk-base:3.+') transitive = true
      implementation('io.intercom.android:intercom-sdk-fcm:3.+') transitive = true

      // Firebase dependencies
      implementation('com.google.android.gms:play-services-base:16.0.1') transitive = false
      implementation('com.google.firebase:firebase-core:16.0.4') transitive = false

      implementation('com.google.firebase:firebase-messaging:17.3.3') transitive = false
      implementation('com.google.firebase:firebase-firestore:17.1.1') transitive = false

      implementation('com.google.firebase:firebase-auth:16.0.4') transitive = false
      implementation('com.google.android.gms:play-services-auth:16.0.1') transitive = false


      // OneSignal dependency
      implementation('com.onesignal:OneSignal:[3.9.1, 3.99.99]') transitive = false

      // Bugsnag
      implementation('com.bugsnag:bugsnag-android:4.+') transitive = false


      // Run this once to be able to run the application with BUCK
      // puts all compile dependencies into folder libs for BUCK to use
      task copyDownloadableDepsToLibs(type: Copy)
      from configurations.compile
      into 'libs'


      apply plugin: 'com.google.gms.google-services'


      I looked everywhere but couldn't find anything about InternalAuthProvider or why it's failing. Any ideas?







      android react-native gradle react-native-firebase






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 9 at 20:41









      GabrielOliv

      162




      162



























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53232990%2freact-native-java-lang-noclassdeffounderror-failed-resolution-of-lcom-google%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53232990%2freact-native-java-lang-noclassdeffounderror-failed-resolution-of-lcom-google%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Use pre created SQLite database for Android project in kotlin

          Darth Vader #20

          Ondo