-1

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

Harish Bhagtani
  • 149
  • 1
  • 10

2 Answers2

0

try with disabling aapt2 by putting android.enableAapt2=false in gradle.properties

Jarvis
  • 1,714
  • 2
  • 20
  • 35
  • Tried it but didn't worked... Error is showing again – Harish Bhagtani Oct 27 '17 at 08:32
  • 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
  • which buildToolsversion you are using? – Aditi Oct 27 '17 at 08:34
  • My Build tool Version is 3.0.0 – Harish Bhagtani Oct 27 '17 at 08:38
  • No sorry... its 26.0.2 – Harish Bhagtani Oct 27 '17 at 08:39
  • 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