I know this is related to the build.gradle, but still don't know how to solve it.
Currently, 0.9.0 with 0.42, I haven't had a problem with a previous setup.
Dex: Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzmy;
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzmy;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:579)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:517)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
:app:transformClassesWithDexForDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
Oh well, this is how I solved it eventually.
:+ and commenting out.
compile 'com.google.android.gms:play-services-auth:+' // should be at least 9.0.0
compile (project(":react-native-google-signin")){
exclude group: "com.google.android.gms" // very important
}
}
// apply plugin: 'com.google.gms.google-services' // <--- this should be the last line
Just to make @goodhyun's helpful answer more clear. The last line (applying the 'com.google.gms.google-services' plugin) should indeed be commented out.
This confused us at first because it says:
this should be the last line
We were confused as to why a commented-out line should have to be in a particular place.
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
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/android/gms/auth/api/signin/internal/zzf;
Most helpful comment
Oh well, this is how I solved it eventually.
:+ and commenting out.