Ionic Error: An error occurred while running subprocess cordova
See original GitHub issueDescription:
Running ionic cordova build...
command errors with output like below
...
:cdvBuildDebug
BUILD SUCCESSFUL
Total time: 8.893 secs
Command finished with error code 0: /Users/marqueswoodson/Projects/platforms/android/gradlew cdvBuildDebug,-b,/Users/marqueswoodson/Projects/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Dorg.gradle.jvmargs=-Xmx2048m,-Pandroid.useDeprecatedNdk=true,-PcdvCompileSdkVersion=android-28
Built the following apk(s):
/Users/marqueswoodson/Projects/platforms/android/build/outputs/apk/android-debug.apk
No scripts found for hook "after_compile".
No scripts found for hook "after_build".
[ERROR] An error occurred while running subprocess cordova.
cordova build android --verbose -- --gradleArg=-PcdvCompileSdkVersion=android-28 exited with exit
code 1.
Re-running this command with the --verbose flag may provide more information.
ionic:cli-framework:utils:process onBeforeExit handler: process.exit received +0ms
ionic:cli-framework:utils:process onBeforeExit handler: running 2 queued functions +0ms
ionic:cli-framework:utils:process onBeforeExit handler: exiting (exit code 1) +72ms
The actual build does work, as you can see above. There’s no errors in the output.
Steps to Reproduce:
Try building an android project with ionic 4.x.
If I run the above without the ionic keyword:
cordova build android --verbose -- --gradleArg=-PcdvCompileSdkVersion=android-28
it works fine.
Output:
My ionic info
:
Ionic:
ionic (Ionic CLI) : 4.1.2 (/Users/marqueswoodson/.nvm/versions/node/v8.9.4/lib/node_modules/ionic)
Ionic Framework : unknown
@ionic/v1-toolkit : 1.0.10
Cordova:
cordova (Cordova CLI) : 7.1.0
Cordova Platforms : android 6.3.0
Cordova Plugins : no whitelisted plugins (25 plugins total)
System:
Android SDK Tools : 26.1.1 (/Users/marqueswoodson/android-sdk)
NodeJS : v8.9.4 (/Users/marqueswoodson/.nvm/versions/node/v8.9.4/bin/node)
npm : 2.15.12
OS : macOS High Sierra
Xcode : Xcode 10.0 Build version 10A255
Other Information:
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
ERROR: An error occurred while running subprocess cordova
This is because the path to Android Sdk is not set correctly. Please check the correct path for Sdk, tools, platform-tools, emulator and ......
Read more >An error occurred while running subprocess cordova ... - GitHub
hello All I am getting following error when i try to run App in ionic emulater android or browser. Also below you can...
Read more >[ERROR] An error occurred while running subprocess cordova
while running build command ionic cordova build android --verbose I am getting an error for Cordova due to I am not able to...
Read more >An error occurred while running subprocess cordova in ionic 4
This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. ... * Try: Run...
Read more >[ERROR] An error occurred while running subprocess cordova
Ionic 3: [ERROR] An error occurred while running subprocess cordova · Información. · Actualizar la plataforma iOS o Android. · Simular con run...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
in case of others who still not fixed yet, I remove the platform folder, then run the cmd again. Its work fine with me
Locking this issue, see https://github.com/ionic-team/ionic-cli/issues/3673#issuecomment-429364015