问题
*
Error:Execution failed for task ':app:transformClassesWithDexForRelease'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/firebase/iid/zzb;
* DESCRIPTION:- During Debug it works fine however when trying to generate apk Android studio error above Error.
回答1:
This error is because of the different version of gradle for any of the google service module that you might be using in your project.
Check your Build.gradle file and the versions, they must be same.
回答2:
It fix this error by reducing version, From com.google.android.gms:play-services-maps:10.2.1 to com.google.android.gms:play-services-maps:9.0.0
来源:https://stackoverflow.com/questions/43844526/execution-failed-for-task-apptransformclasseswithdexforrelease