Hello, I’m doing the project build for Android and it always give this error:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’.
java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.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 42s
at ChildProcess.whenDone (/Users/marinagosson/Developer/Foitop/ionic/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:557:12)
(node:66837) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:66837) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
IONIC INFO
Gathering environment info - done!
Ionic:
ionic (Ionic CLI) : 4.1.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.9
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0
Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 20 other plugins)
System:
ios-deploy : 2.0.0
NodeJS : v8.11.2 (/usr/local/bin/node)
npm : 6.4.0
OS : macOS High Sierra
Xcode : Xcode 9.4 Build version 9F1027a
Environment:
ANDROID_HOME : not set
Plugins
cordova plugin ls
com-badrit-base64 0.2.0 “Base64”
cordova-custom-config 5.0.2 “cordova-custom-config”
cordova-plugin-android-permissions 1.0.0 “Permissions”
cordova-plugin-app-version 0.1.9 “AppVersion”
cordova-plugin-calendar 5.1.2 “Calendar”
cordova-plugin-camera 4.0.3 “Camera”
cordova-plugin-contacts 3.0.1 “Contacts”
cordova-plugin-crop 0.3.1 “CropPlugin”
cordova-plugin-device 1.1.7 “Device”
cordova-plugin-facebook4 1.10.1 “Facebook Connect”
cordova-plugin-file 6.0.1 “File”
cordova-plugin-filepath 1.4.2 “cordova-plugin-filepath”
cordova-plugin-firebase 1.0.5 “Google Firebase Plugin”
cordova-plugin-google-analytics 1.8.6 “Google Universal Analytics Plugin”
cordova-plugin-inappbrowser 2.0.2 “InAppBrowser”
cordova-plugin-ionic-webview 1.2.1 “cordova-plugin-ionic-webview”
cordova-plugin-network-information 2.0.1 “Network Information”
cordova-plugin-splashscreen 4.1.0 “Splashscreen”
cordova-plugin-statusbar 2.4.2 “StatusBar”
cordova-plugin-whitelist 1.3.3 “Whitelist”
cordova-plugin-x-socialsharing 5.4.1 “SocialSharing”
cordova-sms-plugin 0.1.13 “Cordova SMS Plugin”
cordova-sqlite-storage 2.4.0 “Cordova sqlite storage plugin”
cordova.plugins.diagnostic 3.9.2 “Diagnostic”
es6-promise-plugin 4.2.2 “Promise”
Has anyone had this problem that could help me?
Thanks in advance.