I recently updated to stable version of android studio 3.0. Earlier, everything was fine. But now I am getting an error while building my app apk file. Here are the screenshots of error and my Gradle File. I tried deleting .gradle folder from my project. Invalidating the caches and restarting the android Studio. I also cleaned my project and rebuilt it… But the error remained… Please help…enter image description here
Asked
Active
Viewed 234 times
-1
-
have you tried clean and rebuild your project? – Sunil P Oct 27 '17 at 08:23
-
Please see this question here, https://stackoverflow.com/questions/46267621/unable-to-merge-dex – Chirag Jain Oct 27 '17 at 08:24
-
obviously you have two support libraries with different versions – Selvin Oct 27 '17 at 08:33
-
@Selvin which two libraries?? – Harish Bhagtani Oct 27 '17 at 08:42
-
obiously newest 26 and 26 alpha – Selvin Oct 27 '17 at 08:46
2 Answers
0
try with disabling aapt2 by putting android.enableAapt2=false
in gradle.properties

Jarvis
- 1,714
- 2
- 20
- 35
-
-
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. > java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex – Harish Bhagtani Oct 27 '17 at 08:32
0
Try cleaning and rebuilding the project

Aditi
- 389
- 4
- 13
-
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. > java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex – Harish Bhagtani Oct 27 '17 at 08:33
-
-
-
-
Could you update the compile dependencies to implementation 'com.android.support:design:26.1.0' version should be 26.1.0.Also please check whether each compile dependencies have same android dependencies. This can be done by using Gradle(right corner of android studio)->go to your module->tasks->android->android dependencies – Aditi Oct 27 '17 at 08:45
-
Still showing the same error. i updated the version... Updated the 'compile' to 'implementation' – Harish Bhagtani Oct 27 '17 at 08:57
-
Now the error i gone after removing google play services dependency... Thank you soo much ma'am.. :) – Harish Bhagtani Oct 27 '17 at 09:05