ionic-cli: Build Fail after update to Ionic CLI v3
From @naveedahmed1 on May 19, 2017 22:14
Ionic version: (check one with “x”) [ ] 1.x [ ] 2.x [x ] 3.x
I’m submitting a … (check one with “x”) [x ] bug report [ ] feature request [ ] support request
Current behavior:
With Ionic 3 and Ionic CLI v3, run and build command fails with below error
:mergeDebugResources
Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
:mergeDebugResources FAILED
BUILD FAILED
Total time: 1.74 secs
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova run android (exit code 1).
Steps to Reproduce Error
Create a new project
ionic start MyPrtoject blank --id com.myproject
Add platform android
ionic cordova platform add android@6.2.3
Run Project
ionic cordova run android
Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
global packages:
@ionic/cli-utils : 1.1.2
Cordova CLI : 7.0.1
Ionic CLI : 3.1.2
local packages:
@ionic/app-scripts : 1.3.7
@ionic/cli-plugin-cordova : 1.1.2
@ionic/cli-plugin-ionic-angular : 1.1.2
Ionic Framework : ionic-angular 3.2.1
System:
Node : v7.9.0
OS : Windows 10
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
Some posts on forum suggest removing platform and ./resources/android and adding platform again and generating resources again. But it doesn’t work.
Copied from original issue: driftyco/ionic#11732
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (6 by maintainers)
SOLVED
Remove platforms
$ sudo rm -rf platformsAdd and re-build platform
$ ionic cordova run ios --target='iPhone-X'It will fix the error
There is a related issue at StackOverflow: https://stackoverflow.com/questions/44550703/cordova-multiple-dex-files-define-lcom-google-android-gms-iid-zzc
Already tried it, tried it again. removed folders /resources/android and /resources/ios then run the command ionic cordova resources removed the platform then added it again using command ionic cordova platform add android@latest. Even after this its throwing the same error.
I haven’t added any custom code, its the default project generated through command ionic start MyProject blank --id com.myproject.
I just added the platform android and tried to run and it fails. Even tried creating a new project still same error.