Dhara Bhavsar
Dhara Bhavsar

Reputation: 355

After update to Android studio 3.5 getting the following error- FAILURE: Build failed with an exception

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

Answers (1)

Pierre
Pierre

Reputation: 9062

After updating Android Studio to 3.5:

  1. Update Gradle 5.4.1
  2. In Top-Level build.gradle update classpath 'com.google.gms:google-services:4.3.1'
  3. Add -allowaccessmodification to your proguard file.

If you get this warning: enter image description here Add the dependency to force using the latest:

implementation "androidx.versionedparcelable:versionedparcelable:1.1.0"

Upvotes: 1

Related Questions