Last time I build successfully but after adding the number of pages I am unable to build, I did search for that error a lot but nothing works for me.For example, added and removed the platform, ionic cordova clean , ionic cordova build etc…
Following Error facing by running-- ionic cordova build android
What went wrong: Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForD ebug’. java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.de xing.DexArchiveMergerException: Unable to merge dex
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 7s
IOnic Info:
cli packages: (C:\Users\ITSERV\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.19.2 ionic (Ionic CLI) : 3.20.0 global packages:
cordova (Cordova CLI) : 8.0.0 local packages:
@ionic/app-scripts : 3.1.8 Cordova Platforms : android 7.0.0 Ionic Framework : ionic-angular 3.9.2 System:
Node : v6.11.2 npm : 3.10.10 OS : Windows 7
Thanks in advance!
I solved this issue by running simply this command and then build the project. don't go into complicated answers like upgrading Gradle or google packages etc..
cordova clean android
ionic cordova build android
What helped me was running:
cordova clean
I solve with
Cordova Clean Android
Cordova Build Android
I did struggle with this issue for 2 days after i used google maps plugin inside my app and i suppose it is because of google-play-service conflicts and i resolved it by install the latest grade release by using this command. Hope it helps anyone else facing this issue
ionic cordova plugin add cordova-android-play-services-gradle-release
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With