I got this error when we run apk file of our application. In build.gradle
we set multidex and compile multidex is existed in Gradle file . We changed the version of
I was having this issue when i enabled proguard, when i'm disabling it I don't get the crash. I fixed it by adding following dependencies in my app level gradle. I have used FCM, Firebase Analytics and google location in my app. So I had to add the following, if u r not using anything then skip it.
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.firebase:firebase-messaging:20.2.0'
implementation 'com.google.firebase:firebase-analytics:17.4.3'
Also add the following in your proguard rules file.
-dontshrink
-dontoptimize
-dontwarn
-dontpreverify
For me i tried adding implementation 'com.google.android.gms:play-services-auth:18.0.0' didnot work for me..
But after adding the below dependency it worked for me.
implementation 'com.android.support:multidex:1.0.3'
This is happen when we try to authenticate user with some authenticate service like AccountKit
FirebaseAuth
and those service depends on play-services-auth
So, Add
implementation 'com.google.android.gms:play-services-auth:16.0.0'
on your build.gradle dependencies
Well, I am using Account Kit from Facebook. After I adding play-services-auth problem is resolved.
implementation 'com.facebook.android:account-kit-sdk:4.39.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
I was using a react native package
react-native-facebook-account-kit
resolved by adding
implementation 'com.google.android.gms:play-services-auth:16.0.1'
I fixed this issue. Please follow below code.
Added following to android/build.gradle
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"
}
}
}