I have the next exception directly after launching app. Multidex is enabled and there is no another solution for this problem.
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/R$string;
at com.google.android.gms.common.internal.StringResourceValueReader.(Unknown Source)
at com.google.firebase.FirebaseOptions.fromResource(com.google.firebase:firebase-common@@17.0.0:160)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.0.0:296)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@17.0.0:53)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1751)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1726)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@17.0.0:47)
at android.app.ActivityThread.installProvider(ActivityThread.java:6297)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5815)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5736)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1648)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6617)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.R$string" on path: DexPathList[[zip file "/data/app/asta.mobi.digitalcleaning-1/base.apk"],nativeLibraryDirectories=[/data/app/asta.mobi.digitalcleaning-1/lib/arm64, /data/app/asta.mobi.digitalcleaning-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/vendor/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.google.android.gms.common.internal.StringResourceValueReader.(Unknown Source)Â
at com.google.firebase.FirebaseOptions.fromResource(com.google.firebase:firebase-common@@17.0.0:160)Â
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.0.0:296)Â
at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@17.0.0:53)Â
at android.content.ContentProvider.attachInfo(ContentProvider.java:1751)Â
at android.content.ContentProvider.attachInfo(ContentProvider.java:1726)Â
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@17.0.0:47)Â
at android.app.ActivityThread.installProvider(ActivityThread.java:6297)Â
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5815)Â
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5736)Â
at android.app.ActivityThread.-wrap2(ActivityThread.java)Â
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1648)Â
at android.os.Handler.dispatchMessage(Handler.java:105)Â
at android.os.Looper.loop(Looper.java:156)Â
at android.app.ActivityThread.main(ActivityThread.java:6617)Â
at java.lang.reflect.Method.invoke(Native Method)Â
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)Â
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)Â
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
@mishatron Thanks for filing this issue! Can you let us know what Firebase dependencies you are using and at what version?
@schmidt-sebastian @mishatron Even I'm getting this issue after updating Firebase Libraries to Latest Versions, Please provide Solution...

I'll put my relevant build.gradle here:-
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
apply plugin: 'io.fabric' //Crashlytics
apply plugin: 'com.google.firebase.firebase-perf' // Firebase App Performance
android
{
compileSdkVersion 28
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.app.zoodify"
minSdkVersion 19
targetSdkVersion 26
versionCode 63
versionName "0.6.14"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
compileOptions.incremental = false
vectorDrawables.useSupportLibrary = true
// Enabling multidex support.
multiDexEnabled true
javaCompileOptions {
annotationProcessorOptions {
arguments = [eventBusIndex: "com.app.zoodify.EventBusIndex"]
}
}
}
buildTypes {
debug {
applicationIdSuffix ".debug"
debuggable true
minifyEnabled false
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
debuggable false
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
java {
//exclude '**/BroadcastListAdapter.java'
//sourceSets.main.res.filter.exclude '**/MaterialColors.xml'
//exclude '**/main/res/custom/*.xml'
exclude '**/CustomImageFormatConfigurator.java', '**/SVGdecoder.java', '**/FlokkBoardFragmentFirebaseGrid.java'
}
}
androidTest {
java {
//exclude '**/BroadcastListAdapter.java'
//exclude '**/main/res/custom/*.xml'
//sourceSets.main.res.filter.exclude '**/MaterialColors.xml'
exclude '**/CustomImageFormatConfigurator.java', '**/SVGdecoder.java', '**/FlokkBoardFragmentFirebaseGrid.java'
}
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.dagger:dagger:2.13'
//implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation('com.jakewharton:butterknife:10.0.0') {
exclude group: 'com.android.support'
}
/* FireBase */
//Firebase CrashLytics
releaseImplementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') {
transitive = true
}
debugImplementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') {
transitive = true
}
//Firebase Core Needed for Crashlytics
implementation 'com.google.firebase:firebase-core:17.0.1'
//Firebase Performance Monitoring
implementation 'com.google.firebase:firebase-perf:18.0.1'
//Firebase Auth
implementation 'com.google.firebase:firebase-auth:18.1.0'
//Firebase Database
implementation 'com.google.firebase:firebase-database:18.0.1'
//Firebase Messaging (FCM)
implementation 'com.google.firebase:firebase-messaging:19.0.1'
//Firebase Invites
implementation 'com.google.firebase:firebase-invites:17.0.0'
//Firebase Database UI adapters
/*implementation('com.firebaseui:firebase-ui-database:4.0.1') {
transitive = false
}*/
/*Work Manager*/
def work_version = "2.1.0"
implementation "androidx.work:work-runtime:$work_version"
/* processor */
annotationProcessor 'com.google.dagger:dagger-compiler:2.13'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
annotationProcessor 'org.greenrobot:eventbus-annotation-processor:3.1.1'
annotationProcessor 'dk.ilios:realmfieldnameshelper:1.1.1'
annotationProcessor "com.google.dagger:dagger-compiler:2.13"
/* test */
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
//androidTestImplementation "android.arch.work:work-testing:$work_version"
}
/* Added for FilePicker Library */
configurations {
cleanedAnnotations
compile.exclude group: 'org.jetbrains', module: 'annotations'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
`
Hey @dishantghai, Did you fix this issue? Because I'm facing a similar issue. I found out that this is because of implementation 'com.google.firebase:firebase-perf:18.0.1' . If I disable it using this code in build type 0
FirebasePerformance {
instrumentationEnabled true
}
the app runs fine. Any idea? anyone?
As a first step, can you update your Firebase Dependencies? A couple of them are one major version behind (Auth, RTDB) and this might create a conflict with the version of firebase-core that you are pulling in.
@schmidt-sebastian I tried updating the dependencies, still wasn't able to fix this. In the end, I had to disable the FirebasePerformance.
I am getting the same crash. To me, the error occurs when upgrading the android gradle plugin (and android studio) from version 3.5.3 to version 3.6.0-rc01
@WhatDo Are you using this com.google.firebase:firebase-perf: by any chance?
I've been having exactly the same problem for a couple of months now (which prevents me from updating to a newer version of AS/gradle - works fine on 3.5 Canary 10).
I only use com.google.firebase:firebase-core, com.google.firebase:firebase-storage, com.google.firebase:firebase-messaging, com.google.firebase:firebase-appindexing.
Tried different versions of these libraries, it didn't help.
I don't know how many hours I've wasted on this. A LOT. I've stumbled upon this.
Basically, it's a Realm Plugin issue that's been occurring since AS 3.6.0-alpha01. Update Realm to version >= 5.13.1 and it will work. It did for me, finally 🙄
no, i'm using com.google.firebase:firebase-messaging
@dgomolka wow, updating the realm plugin worked wonders! Thanks a lot!
I don't know how many hours I've wasted on this. A LOT. I've stumbled upon this.
Basically, it's a Realm Plugin issue that's been occurring since AS 3.6.0-alpha01. Update Realm to version >= 5.13.1 and it will work. It did for me, finally 🙄
What to do If I am not using the realm plugin?
@pratikbutani This issue points to a dependency conflict in you app and is likely caused by pulling in an incompatible version of Guava. If you can share your dependency tree, we might be able to help you.
What if I'm not using realm plugin???????
@tianxu0836 Please share your dependency tree.
In my case, it was because of objectbox. Updating to 2.5.x fixed it.
I'm not using Realm or objectbox. This just started happening out of the blue (i.e. no code changes). The dependency tree is huge (over 100 modules).
Simply reordering the classpath dependencies (moving the agp plugin from 3rd to 2nd) fixed the issue. Possibly related to https://issuetracker.google.com/issues/153249519 which I now realize started happening shortly after adding the performance plugin (com.google.firebase:perf-plugin:1.3.1) so maybe that's the real culprit here.
I fixed it by updating objectbox to 2.5.x
On Wed, May 13, 2020 at 5:16 AM Eliezer Graber notifications@github.com
wrote:
I'm not using Realm or objectbox. This just started happening out of the
blue (i.e. no code changes). The dependency tree is huge (over 100 modules).Simply reordering the classpath dependencies (moving the agp plugin from
3rd to 2nd) fixed the issue. Possibly related to
https://issuetracker.google.com/issues/153249519 which I now realize
started happening shortly after adding the performance plugin (
com.google.firebase:perf-plugin:1.3.1) so maybe that's the real culprit
here.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/firebase/firebase-android-sdk/issues/665#issuecomment-627942569,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAQNOVU52DOZGBEZSEGHDMDRRKFRBANCNFSM4IHEVPPA
.
this caused by performance plugin, I am using classpath('com.google.firebase:perf-plugin:1.2.1'). and works after disabling it.
not sure why it suddenly didn't work. my hypothesis this mixed by multidex
Closing since https://github.com/firebase/firebase-android-sdk/issues/665#issuecomment-574431015 seems to be the way to go
Please reopen. There are multiple comments stating that their project does not use Realm.
Please reopen. There are multiple comments stating that their project does not use Realm.
Thanks for pushing this. IIUC the class of errors you are referring to involves reordering the plugin application ?
The fix is to reorder the plugins. It seems like the issue is caused by the presence of the performance plugin.
Noted. Are there other plugins you are using ?
Can you share relevant sections of your gradle file ?
This is from the buildscript block
repositories {
google()
jcenter()
gradlePluginPortal()
}
dependencies {
classpath "com.android.tools.build:gradle:$androidPluginVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.squareup.sqldelight:gradle-plugin:$sqlDelightVersion"
classpath "com.google.gms:google-services:4.3.3"
classpath "com.google.firebase:firebase-crashlytics-gradle:2.1.1"
classpath "com.github.ben-manes:gradle-versions-plugin:0.28.0"
classpath "com.eygraber:ejson-gradle-plugin:1.0.4"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion"
classpath "com.google.firebase:perf-plugin:1.3.1"
classpath "com.google.firebase:firebase-appdistribution-gradle:1.4.1"
classpath "gradle.plugin.com.cookpad.android.plugin:plugin:1.2.2"
}
Assigning to current Fireperf oncallers to take a look.
Yeah, I stumbled upon this issue. I literally ran the app once, it worked perfectly, then I ran the app again by changing some layout code and this started happening! Like literally out of nowhere!
@eygraber Can you try to get the dependency tree diff before and after your reorder?
I just got into that state, and there is no diff in the trees that I got before and after.
As I mentioned above, this might be related to https://issuetracker.google.com/issues/153249519.
@eygraber Thanks. Do you mind trying your build again with perf-plugin removed? Just want to make sure it is the issue in https://issuetracker.google.com/issues/153249519, not perf-plugin, so that we can close this thread and just track it there.
We ran more tests, and removing perf-plugin fixes it, but also removing any other plugin fixes it, so the current thinking is that it is not related to perf-plugin.
I can't speak for other users experiencing this issue, and whether it is related to https://issuetracker.google.com/issues/153249519 or not.
I'm gonna close this one now. The thread is so long and mixed with different causes. Feel free to open another one if https://issuetracker.google.com/issues/153249519 turns out not to be the cause. Thanks!
Hi, can you please re-open the thread. I am facing a similar issue with firebase-perf. I am getting a NoClassDeffError when it is enabled. Everything works fine when I disable it. Please find my logs below:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.testflight.app, PID: 22011
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/neovisionaries/ws/client/D;
at com.neovisionaries.ws.client.WebSocketFactory.<init>(SourceFile:2)
at it.slyce.sdk.internal.SlyceWebSocketWorkflowTask.e(SourceFile:1)
at it.slyce.sdk.internal.SlyceWebSocketWorkflowTask.onEncodingComplete(SourceFile:3)
at it.slyce.sdk.internal.BitmapEncodingTask.a(SourceFile:4)
at it.slyce.sdk.internal.BitmapEncodingTask.onPostExecute(SourceFile:1)
at android.os.AsyncTask.finish(AsyncTask.java:755)
at android.os.AsyncTask.access$900(AsyncTask.java:192)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:772)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7811)
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:1076)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.neovisionaries.ws.client.D" on path: DexPathList[[zip file "/data/app/com.ashleyfurniturehomestore.ecomm-X1w1G27mqcSRlwfLujt7mQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.testflight.app-X1w1G27mqcSRlwfLujt7mQ==/lib/arm64, /data/app/com.testflight.app-X1w1G27mqcSRlwfLujt7mQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.neovisionaries.ws.client.WebSocketFactory.<init>(SourceFile:2)
at it.slyce.sdk.internal.SlyceWebSocketWorkflowTask.e(SourceFile:1)
at it.slyce.sdk.internal.SlyceWebSocketWorkflowTask.onEncodingComplete(SourceFile:3)
at it.slyce.sdk.internal.BitmapEncodingTask.a(SourceFile:4)
at it.slyce.sdk.internal.BitmapEncodingTask.onPostExecute(SourceFile:1)
at android.os.AsyncTask.finish(AsyncTask.java:755)
at android.os.AsyncTask.access$900(AsyncTask.java:192)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:772)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7811)
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:1076)
@dumbo4d
Can you provide your gradle dependencies info? Like your root-level and app-level gradle files (hiding any sensitive info)? Along with that can you also share which machine (Mac, Windows, Linux) are you running your build on?
Hi @ramanpreetSinghKhinda , please find below my root build.graldle file and app build.gradle file.
I am currently using Mac machine.

App level:
dependencies {
implementation 'com.google.firebase:firebase-analytics-ktx:17.4.4'
implementation 'com.google.firebase:firebase-crashlytics:17.1.1'
implementation 'com.google.firebase:firebase-perf:19.0.7'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(dir: 'libs', include: ['*.aar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.abtasty:flagship-android:1.0.1'
implementation 'com.google.firebase:firebase-messaging:20.2.3'
implementation 'com.gimbal.android.v4:gimbal-sdk:4.2.1'
implementation 'com.gimbal.android.v4:gimbal-slf4j-impl:4.2.1'
implementation 'com.aurelhubert:ahbottomnavigation:2.2.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.google.dagger:dagger:2.27'
implementation 'com.google.dagger:dagger-android:2.15'
implementation 'com.google.dagger:dagger-android-support:2.15'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.gms:play-services-vision:20.1.0'
implementation 'com.google.firebase:firebase-core:17.4.4'
implementation 'com.google.firebase:firebase-iid:20.2.3'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.squareup.okhttp3:okhttp:4.3.1'
implementation 'com.squareup.okhttp3:logging-interceptor:4.3.1'
implementation 'com.multidots:fingerprint-auth:1.0.1'
implementation 'org.jsoup:jsoup:1.12.1'
annotationProcessor 'com.google.dagger:dagger-compiler:2.25.2'
annotationProcessor 'com.google.dagger:dagger-android-processor:2.16'
annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.2.0'
kapt 'com.google.dagger:dagger-compiler:2.25.2'
compileOnly 'javax.annotation:jsr250-api:1.0'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.25.0'
testImplementation 'org.mockito:mockito-inline:2.15.0'
testImplementation 'androidx.arch.core:core-testing:2.1.0'
testImplementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testImplementation('org.jetbrains.spek:spek-api:1.1.5') {
exclude group: 'org.jetbrains.kotlin'
}
testImplementation('org.jetbrains.spek:spek-junit-platform-engine:1.1.5') {
exclude group: 'org.junit.platform'
exclude group: 'org.jetbrains.kotlin'
}
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
Most helpful comment
I don't know how many hours I've wasted on this. A LOT. I've stumbled upon this.
Basically, it's a Realm Plugin issue that's been occurring since AS 3.6.0-alpha01. Update Realm to version >= 5.13.1 and it will work. It did for me, finally 🙄