Reputation: 355
I updated my Android Studio to v3.5 yesterday and I am getting the following error while trying to build a new release build.
FAILURE: Build failed with an exception.
*What went wrong:
Execution failed for task ':app:transformClassesAndResourcesWithR8ForDevRelease'.
java.lang.IllegalArgumentException: Multiple entries with same key: Method com.google.firebase.crash.FirebaseCrash.zza Proto VZZ void boolean boolean=Encoded method Method com.google.firebase.crash.FirebaseCrash.zza Proto VZZ void boolean boolean and Method com.google.firebase.crash.FirebaseCrash.zza Proto VZZ void boolean boolean=Encoded method Method com.google.firebase.crash.FirebaseCrash.zza Proto VZZ void boolean boolean
Already referred to post because before this I was getting the same error for FirebaseInstanceId.
I added the following in my proguard-rules.pro file
-keep class com.google.firebase.iid.FirebaseInstanceId { zza(...); }
-keep class com.google.firebase.iid.FirebaseCrash { zza(...); }
but it did not work for FirebaseCrash class.
Upvotes: 2
Views: 600
Reputation: 9062
After updating Android Studio to 3.5:
build.gradle
update classpath 'com.google.gms:google-services:4.3.1'
-allowaccessmodification
to your proguard file.If you get this warning:
Add the dependency to force using the latest:
implementation "androidx.versionedparcelable:versionedparcelable:1.1.0"
Upvotes: 1