java.lang.NoClassDefFoundError: Failed resolution Failed resolution of:...












15















I am following a tutorial (link) to upload images to Firebase database but am getting the below error. I rechecked the gradle dependencies and also enabled multidex support but error still remains



java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzab;
at com.google.firebase.storage.FirebaseStorage.getInstance(Unknown Source)
at com.paperwrrk.android.storageref.MainActivity.<init>(MainActivity.java:36)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2351)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5461)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzab" on path: DexPathList[[dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-tubesock-0.0.11_74622aa9da17bf60443b34c100000d076f6631ba-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-support-annotations-25.0.0_416ca7aea2b0e15fba678c97c0d71c330758ffee-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-jackson-databind-2.2.2_169f7b55dddecf9b169deccb0ac50ee124eda962-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-jackson-core-2.2.2_3ae6e87b0280ab52f712dfb927e3401fe25aa21c-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-jackson-annotations-2.2.2_dd21f43a23482b41eb5ed094fcce68c90eeb0ffd-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_e8156948d2eb9e5ed0b41cc1f9f830e7838bb3b5-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_9056040795c4cf170b00cbf021bf976514542498-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_79b2045e82b81d2f064515f884990a3d2a9f29af-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_2879b3ac18601405060244958a8db64bdb3655f9-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_1ce40cec84eadc9153f026cb869c8b1760c8461a-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-firebase-client-jvm-2.3.1_764f8006


Gradle.app



apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.paperwrrk.android.storageref"
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.google.firebase:firebase-database:10.0.0'
testCompile 'junit:junit:4.12'
compile 'com.firebase:firebase-client-android:2.3.1'
compile 'com.google.firebase:firebase-auth:9.2.1'
compile 'com.google.firebase:firebase-storage:9.2.1'
compile 'com.android.support:multidex:1.0.0'
}


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


Please tell what I'm doing wrong here!










share|improve this question





























    15















    I am following a tutorial (link) to upload images to Firebase database but am getting the below error. I rechecked the gradle dependencies and also enabled multidex support but error still remains



    java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzab;
    at com.google.firebase.storage.FirebaseStorage.getInstance(Unknown Source)
    at com.paperwrrk.android.storageref.MainActivity.<init>(MainActivity.java:36)
    at java.lang.Class.newInstance(Native Method)
    at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2351)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
    at android.app.ActivityThread.-wrap11(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5461)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
    at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
    Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzab" on path: DexPathList[[dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-tubesock-0.0.11_74622aa9da17bf60443b34c100000d076f6631ba-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-support-annotations-25.0.0_416ca7aea2b0e15fba678c97c0d71c330758ffee-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-jackson-databind-2.2.2_169f7b55dddecf9b169deccb0ac50ee124eda962-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-jackson-core-2.2.2_3ae6e87b0280ab52f712dfb927e3401fe25aa21c-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-jackson-annotations-2.2.2_dd21f43a23482b41eb5ed094fcce68c90eeb0ffd-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_e8156948d2eb9e5ed0b41cc1f9f830e7838bb3b5-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_9056040795c4cf170b00cbf021bf976514542498-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_79b2045e82b81d2f064515f884990a3d2a9f29af-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_2879b3ac18601405060244958a8db64bdb3655f9-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_1ce40cec84eadc9153f026cb869c8b1760c8461a-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-firebase-client-jvm-2.3.1_764f8006


    Gradle.app



    apply plugin: 'com.android.application'

    android {
    compileSdkVersion 25
    buildToolsVersion "24.0.3"
    defaultConfig {
    applicationId "com.paperwrrk.android.storageref"
    minSdkVersion 18
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
    }
    buildTypes {
    release {
    minifyEnabled false
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    }
    packagingOptions {
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE-FIREBASE.txt'
    exclude 'META-INF/NOTICE'
    }
    }

    dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.0.0'
    compile 'com.google.firebase:firebase-database:10.0.0'
    testCompile 'junit:junit:4.12'
    compile 'com.firebase:firebase-client-android:2.3.1'
    compile 'com.google.firebase:firebase-auth:9.2.1'
    compile 'com.google.firebase:firebase-storage:9.2.1'
    compile 'com.android.support:multidex:1.0.0'
    }


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


    Please tell what I'm doing wrong here!










    share|improve this question



























      15












      15








      15


      1






      I am following a tutorial (link) to upload images to Firebase database but am getting the below error. I rechecked the gradle dependencies and also enabled multidex support but error still remains



      java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzab;
      at com.google.firebase.storage.FirebaseStorage.getInstance(Unknown Source)
      at com.paperwrrk.android.storageref.MainActivity.<init>(MainActivity.java:36)
      at java.lang.Class.newInstance(Native Method)
      at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2351)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
      at android.app.ActivityThread.-wrap11(ActivityThread.java)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)
      at android.os.Handler.dispatchMessage(Handler.java:102)
      at android.os.Looper.loop(Looper.java:148)
      at android.app.ActivityThread.main(ActivityThread.java:5461)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
      at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
      Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzab" on path: DexPathList[[dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-tubesock-0.0.11_74622aa9da17bf60443b34c100000d076f6631ba-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-support-annotations-25.0.0_416ca7aea2b0e15fba678c97c0d71c330758ffee-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-jackson-databind-2.2.2_169f7b55dddecf9b169deccb0ac50ee124eda962-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-jackson-core-2.2.2_3ae6e87b0280ab52f712dfb927e3401fe25aa21c-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-jackson-annotations-2.2.2_dd21f43a23482b41eb5ed094fcce68c90eeb0ffd-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_e8156948d2eb9e5ed0b41cc1f9f830e7838bb3b5-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_9056040795c4cf170b00cbf021bf976514542498-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_79b2045e82b81d2f064515f884990a3d2a9f29af-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_2879b3ac18601405060244958a8db64bdb3655f9-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_1ce40cec84eadc9153f026cb869c8b1760c8461a-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-firebase-client-jvm-2.3.1_764f8006


      Gradle.app



      apply plugin: 'com.android.application'

      android {
      compileSdkVersion 25
      buildToolsVersion "24.0.3"
      defaultConfig {
      applicationId "com.paperwrrk.android.storageref"
      minSdkVersion 18
      targetSdkVersion 25
      versionCode 1
      versionName "1.0"
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      multiDexEnabled true
      }
      buildTypes {
      release {
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
      }
      packagingOptions {
      exclude 'META-INF/LICENSE'
      exclude 'META-INF/LICENSE-FIREBASE.txt'
      exclude 'META-INF/NOTICE'
      }
      }

      dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
      exclude group: 'com.android.support', module: 'support-annotations'
      })
      compile 'com.android.support:appcompat-v7:25.0.0'
      compile 'com.google.firebase:firebase-database:10.0.0'
      testCompile 'junit:junit:4.12'
      compile 'com.firebase:firebase-client-android:2.3.1'
      compile 'com.google.firebase:firebase-auth:9.2.1'
      compile 'com.google.firebase:firebase-storage:9.2.1'
      compile 'com.android.support:multidex:1.0.0'
      }


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


      Please tell what I'm doing wrong here!










      share|improve this question
















      I am following a tutorial (link) to upload images to Firebase database but am getting the below error. I rechecked the gradle dependencies and also enabled multidex support but error still remains



      java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzab;
      at com.google.firebase.storage.FirebaseStorage.getInstance(Unknown Source)
      at com.paperwrrk.android.storageref.MainActivity.<init>(MainActivity.java:36)
      at java.lang.Class.newInstance(Native Method)
      at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2351)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
      at android.app.ActivityThread.-wrap11(ActivityThread.java)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)
      at android.os.Handler.dispatchMessage(Handler.java:102)
      at android.os.Looper.loop(Looper.java:148)
      at android.app.ActivityThread.main(ActivityThread.java:5461)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
      at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
      Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzab" on path: DexPathList[[dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-tubesock-0.0.11_74622aa9da17bf60443b34c100000d076f6631ba-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-support-annotations-25.0.0_416ca7aea2b0e15fba678c97c0d71c330758ffee-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-jackson-databind-2.2.2_169f7b55dddecf9b169deccb0ac50ee124eda962-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-jackson-core-2.2.2_3ae6e87b0280ab52f712dfb927e3401fe25aa21c-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-jackson-annotations-2.2.2_dd21f43a23482b41eb5ed094fcce68c90eeb0ffd-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_e8156948d2eb9e5ed0b41cc1f9f830e7838bb3b5-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_9056040795c4cf170b00cbf021bf976514542498-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_79b2045e82b81d2f064515f884990a3d2a9f29af-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_2879b3ac18601405060244958a8db64bdb3655f9-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-internal_impl-25.0.0_1ce40cec84eadc9153f026cb869c8b1760c8461a-classes.dex", dex file "/data/data/com.paperwrrk.android.storageref/files/instant-run/dex/slice-firebase-client-jvm-2.3.1_764f8006


      Gradle.app



      apply plugin: 'com.android.application'

      android {
      compileSdkVersion 25
      buildToolsVersion "24.0.3"
      defaultConfig {
      applicationId "com.paperwrrk.android.storageref"
      minSdkVersion 18
      targetSdkVersion 25
      versionCode 1
      versionName "1.0"
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      multiDexEnabled true
      }
      buildTypes {
      release {
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
      }
      packagingOptions {
      exclude 'META-INF/LICENSE'
      exclude 'META-INF/LICENSE-FIREBASE.txt'
      exclude 'META-INF/NOTICE'
      }
      }

      dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
      exclude group: 'com.android.support', module: 'support-annotations'
      })
      compile 'com.android.support:appcompat-v7:25.0.0'
      compile 'com.google.firebase:firebase-database:10.0.0'
      testCompile 'junit:junit:4.12'
      compile 'com.firebase:firebase-client-android:2.3.1'
      compile 'com.google.firebase:firebase-auth:9.2.1'
      compile 'com.google.firebase:firebase-storage:9.2.1'
      compile 'com.android.support:multidex:1.0.0'
      }


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


      Please tell what I'm doing wrong here!







      java android firebase firebase-realtime-database






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 17 '18 at 7:57









      Minas Mina

      1,24211324




      1,24211324










      asked Dec 25 '16 at 16:44









      Novo LucasNovo Lucas

      1,22811122




      1,22811122
























          3 Answers
          3






          active

          oldest

          votes


















          24














          now here is the problem, you are using different versions in dependencies of gradle
          So change this



          compile 'com.google.firebase:firebase-database:10.0.0'
          testCompile 'junit:junit:4.12'
          compile 'com.firebase:firebase-client-android:2.3.1'
          compile 'com.google.firebase:firebase-auth:9.2.1'
          compile 'com.google.firebase:firebase-storage:9.2.1'
          compile 'com.android.support:multidex:1.0.0'


          to this



          compile 'com.google.firebase:firebase-database:10.0.1'
          testCompile 'junit:junit:4.12'
          compile 'com.firebase:firebase-client-android:2.3.1'
          compile 'com.google.firebase:firebase-auth:10.0.1'
          compile 'com.google.firebase:firebase-storage:10.0.1'
          compile 'com.android.support:multidex:1.0.0'


          one more thing is that now com.firebae:firebase-client-android is deprecated so you need to replace it with com.google.firebase:firebase-database:10.0.1 and here is the documentation for that https://firebase.google.com/support/guides/firebase-android






          share|improve this answer































            1














            If you are seeking solution for react-native project, make sure there is same version used among different modules and replace "+" with some latest available version.






            share|improve this answer































              0














              try adding like this in the project bundle.gradle file



              allprojects {
              repositories {
              //start here
              configurations.all {
              resolutionStrategy.eachDependency { DependencyResolveDetails details ->
              def requested = details.requested
              if (requested.group == 'com.google.android.gms') {
              details.useVersion '12.0.1'
              }
              if (requested.group == 'com.google.firebase') {
              details.useVersion '12.0.1'
              }
              }
              }
              //end
              jcenter()
              maven {
              url "https://maven.google.com"
              }
              }
              }


              add the following dependencices to Module/bundle.gradle



              implementation 'com.google.firebase:firebase-core:16.0.1'
              implementation 'com.firebaseui:firebase-ui-auth:3.3.0'





              share|improve this answer


























              • This is working fine. But why (in which case) we need to forcefully set the version using Dependency resolution strategy?

                – Milind Mevada
                Feb 5 at 4:23











              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',
              autoActivateHeartbeat: false,
              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%2f41322864%2fjava-lang-noclassdeffounderror-failed-resolution-failed-resolution-of-lcom-goo%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              24














              now here is the problem, you are using different versions in dependencies of gradle
              So change this



              compile 'com.google.firebase:firebase-database:10.0.0'
              testCompile 'junit:junit:4.12'
              compile 'com.firebase:firebase-client-android:2.3.1'
              compile 'com.google.firebase:firebase-auth:9.2.1'
              compile 'com.google.firebase:firebase-storage:9.2.1'
              compile 'com.android.support:multidex:1.0.0'


              to this



              compile 'com.google.firebase:firebase-database:10.0.1'
              testCompile 'junit:junit:4.12'
              compile 'com.firebase:firebase-client-android:2.3.1'
              compile 'com.google.firebase:firebase-auth:10.0.1'
              compile 'com.google.firebase:firebase-storage:10.0.1'
              compile 'com.android.support:multidex:1.0.0'


              one more thing is that now com.firebae:firebase-client-android is deprecated so you need to replace it with com.google.firebase:firebase-database:10.0.1 and here is the documentation for that https://firebase.google.com/support/guides/firebase-android






              share|improve this answer




























                24














                now here is the problem, you are using different versions in dependencies of gradle
                So change this



                compile 'com.google.firebase:firebase-database:10.0.0'
                testCompile 'junit:junit:4.12'
                compile 'com.firebase:firebase-client-android:2.3.1'
                compile 'com.google.firebase:firebase-auth:9.2.1'
                compile 'com.google.firebase:firebase-storage:9.2.1'
                compile 'com.android.support:multidex:1.0.0'


                to this



                compile 'com.google.firebase:firebase-database:10.0.1'
                testCompile 'junit:junit:4.12'
                compile 'com.firebase:firebase-client-android:2.3.1'
                compile 'com.google.firebase:firebase-auth:10.0.1'
                compile 'com.google.firebase:firebase-storage:10.0.1'
                compile 'com.android.support:multidex:1.0.0'


                one more thing is that now com.firebae:firebase-client-android is deprecated so you need to replace it with com.google.firebase:firebase-database:10.0.1 and here is the documentation for that https://firebase.google.com/support/guides/firebase-android






                share|improve this answer


























                  24












                  24








                  24







                  now here is the problem, you are using different versions in dependencies of gradle
                  So change this



                  compile 'com.google.firebase:firebase-database:10.0.0'
                  testCompile 'junit:junit:4.12'
                  compile 'com.firebase:firebase-client-android:2.3.1'
                  compile 'com.google.firebase:firebase-auth:9.2.1'
                  compile 'com.google.firebase:firebase-storage:9.2.1'
                  compile 'com.android.support:multidex:1.0.0'


                  to this



                  compile 'com.google.firebase:firebase-database:10.0.1'
                  testCompile 'junit:junit:4.12'
                  compile 'com.firebase:firebase-client-android:2.3.1'
                  compile 'com.google.firebase:firebase-auth:10.0.1'
                  compile 'com.google.firebase:firebase-storage:10.0.1'
                  compile 'com.android.support:multidex:1.0.0'


                  one more thing is that now com.firebae:firebase-client-android is deprecated so you need to replace it with com.google.firebase:firebase-database:10.0.1 and here is the documentation for that https://firebase.google.com/support/guides/firebase-android






                  share|improve this answer













                  now here is the problem, you are using different versions in dependencies of gradle
                  So change this



                  compile 'com.google.firebase:firebase-database:10.0.0'
                  testCompile 'junit:junit:4.12'
                  compile 'com.firebase:firebase-client-android:2.3.1'
                  compile 'com.google.firebase:firebase-auth:9.2.1'
                  compile 'com.google.firebase:firebase-storage:9.2.1'
                  compile 'com.android.support:multidex:1.0.0'


                  to this



                  compile 'com.google.firebase:firebase-database:10.0.1'
                  testCompile 'junit:junit:4.12'
                  compile 'com.firebase:firebase-client-android:2.3.1'
                  compile 'com.google.firebase:firebase-auth:10.0.1'
                  compile 'com.google.firebase:firebase-storage:10.0.1'
                  compile 'com.android.support:multidex:1.0.0'


                  one more thing is that now com.firebae:firebase-client-android is deprecated so you need to replace it with com.google.firebase:firebase-database:10.0.1 and here is the documentation for that https://firebase.google.com/support/guides/firebase-android







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 25 '16 at 17:10









                  Umar AtaUmar Ata

                  1,76521127




                  1,76521127

























                      1














                      If you are seeking solution for react-native project, make sure there is same version used among different modules and replace "+" with some latest available version.






                      share|improve this answer




























                        1














                        If you are seeking solution for react-native project, make sure there is same version used among different modules and replace "+" with some latest available version.






                        share|improve this answer


























                          1












                          1








                          1







                          If you are seeking solution for react-native project, make sure there is same version used among different modules and replace "+" with some latest available version.






                          share|improve this answer













                          If you are seeking solution for react-native project, make sure there is same version used among different modules and replace "+" with some latest available version.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Dec 24 '18 at 9:46









                          Faisal HassanFaisal Hassan

                          7113




                          7113























                              0














                              try adding like this in the project bundle.gradle file



                              allprojects {
                              repositories {
                              //start here
                              configurations.all {
                              resolutionStrategy.eachDependency { DependencyResolveDetails details ->
                              def requested = details.requested
                              if (requested.group == 'com.google.android.gms') {
                              details.useVersion '12.0.1'
                              }
                              if (requested.group == 'com.google.firebase') {
                              details.useVersion '12.0.1'
                              }
                              }
                              }
                              //end
                              jcenter()
                              maven {
                              url "https://maven.google.com"
                              }
                              }
                              }


                              add the following dependencices to Module/bundle.gradle



                              implementation 'com.google.firebase:firebase-core:16.0.1'
                              implementation 'com.firebaseui:firebase-ui-auth:3.3.0'





                              share|improve this answer


























                              • This is working fine. But why (in which case) we need to forcefully set the version using Dependency resolution strategy?

                                – Milind Mevada
                                Feb 5 at 4:23
















                              0














                              try adding like this in the project bundle.gradle file



                              allprojects {
                              repositories {
                              //start here
                              configurations.all {
                              resolutionStrategy.eachDependency { DependencyResolveDetails details ->
                              def requested = details.requested
                              if (requested.group == 'com.google.android.gms') {
                              details.useVersion '12.0.1'
                              }
                              if (requested.group == 'com.google.firebase') {
                              details.useVersion '12.0.1'
                              }
                              }
                              }
                              //end
                              jcenter()
                              maven {
                              url "https://maven.google.com"
                              }
                              }
                              }


                              add the following dependencices to Module/bundle.gradle



                              implementation 'com.google.firebase:firebase-core:16.0.1'
                              implementation 'com.firebaseui:firebase-ui-auth:3.3.0'





                              share|improve this answer


























                              • This is working fine. But why (in which case) we need to forcefully set the version using Dependency resolution strategy?

                                – Milind Mevada
                                Feb 5 at 4:23














                              0












                              0








                              0







                              try adding like this in the project bundle.gradle file



                              allprojects {
                              repositories {
                              //start here
                              configurations.all {
                              resolutionStrategy.eachDependency { DependencyResolveDetails details ->
                              def requested = details.requested
                              if (requested.group == 'com.google.android.gms') {
                              details.useVersion '12.0.1'
                              }
                              if (requested.group == 'com.google.firebase') {
                              details.useVersion '12.0.1'
                              }
                              }
                              }
                              //end
                              jcenter()
                              maven {
                              url "https://maven.google.com"
                              }
                              }
                              }


                              add the following dependencices to Module/bundle.gradle



                              implementation 'com.google.firebase:firebase-core:16.0.1'
                              implementation 'com.firebaseui:firebase-ui-auth:3.3.0'





                              share|improve this answer















                              try adding like this in the project bundle.gradle file



                              allprojects {
                              repositories {
                              //start here
                              configurations.all {
                              resolutionStrategy.eachDependency { DependencyResolveDetails details ->
                              def requested = details.requested
                              if (requested.group == 'com.google.android.gms') {
                              details.useVersion '12.0.1'
                              }
                              if (requested.group == 'com.google.firebase') {
                              details.useVersion '12.0.1'
                              }
                              }
                              }
                              //end
                              jcenter()
                              maven {
                              url "https://maven.google.com"
                              }
                              }
                              }


                              add the following dependencices to Module/bundle.gradle



                              implementation 'com.google.firebase:firebase-core:16.0.1'
                              implementation 'com.firebaseui:firebase-ui-auth:3.3.0'






                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Jan 8 at 18:25

























                              answered Jan 8 at 18:09









                              Bhaskara AraniBhaskara Arani

                              5281833




                              5281833













                              • This is working fine. But why (in which case) we need to forcefully set the version using Dependency resolution strategy?

                                – Milind Mevada
                                Feb 5 at 4:23



















                              • This is working fine. But why (in which case) we need to forcefully set the version using Dependency resolution strategy?

                                – Milind Mevada
                                Feb 5 at 4:23

















                              This is working fine. But why (in which case) we need to forcefully set the version using Dependency resolution strategy?

                              – Milind Mevada
                              Feb 5 at 4:23





                              This is working fine. But why (in which case) we need to forcefully set the version using Dependency resolution strategy?

                              – Milind Mevada
                              Feb 5 at 4:23


















                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f41322864%2fjava-lang-noclassdeffounderror-failed-resolution-failed-resolution-of-lcom-goo%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

                              Monofisismo

                              Angular Downloading a file using contenturl with Basic Authentication

                              Olmecas