After upgrade Google Play Services to 15.0.0 Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
After upgrade Google Play Services to 15.0.0 Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
I have the same problem, just delete the .gradle file, and then clean your project from Build > Clean Project
you can find .gradle file in project view in the navigator on the top left
If you do not enabled Multidex follow this link: LINK
You should not include com.google.android.gms:play-services:... as a dependency. This adds ALL the Google Play Services APIs to your build and will probably require you to use MultiDex. Instead, follow the directions provided in the Setup Guid in the section titled Selectively compiling APIs into your executable to add as depencies only the specific APIs that you actually use.
But if you feel to use it, you can simple do the following:
Enable Multidex through build.gradle of your app module
multiDexEnabled true
Not Fix my problem. :(
Try this :
From the Build menu -> press the Clean Project button.
When task completed, press the Rebuild Project button from the Build menu.
compile is now deprecated if you are still using it. Use implementation or api