An error occurred while running subprocess cordova.
cordova.cmd build android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Related
enter image description here
Why does this error occur in ionic while running the command ionic Cordova run Android " [ERROR] An error occurred while running subprocess Cordova.Cordova.cmd build Android exited with exit code 1."?
I tried to build my project with CMD:
ionic build --prod
but I have this error:
I am new to IONIC. My problem is that I am trying to build an apk file using downloaded project. I getting an error. Attaching my logs for reference. Any help would be great
Using this command to build apk ionic cordova build android --prod --release
> ionic-v1.cmd build
[17:21:38] Invoking sass gulp task.
> cordova.cmd build android --release
Running command: node E:\Ionic Projets\zmNinja-master\hooks\before_prepare\02_jshint.js E:\Ionic Projets\zmNinja-master
cordova-custom-config: Skipping auto-restore of config file backup(s)
Running command: node E:\Ionic Projets\zmNinja-master\hooks\after_prepare\010_add_platform_class.js E:\Ionic Projets\zmNinja-master
Running command: node E:\Ionic Projets\zmNinja-master\hooks\after_prepare\020_remove_sass_from_platforms.js E:\Ionic Projets\zmNinja-master
Using "requireCordovaModule" to load non-cordova module "glob" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android --release exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.```
When I try ionic cordova build android --prod --release command in Ionic 3, it shows an error
[12:24:50] ionic-app-script task: “build”
[12:24:50] Error: The Angular AoT build failed. See the issues above
Error: The Angular AoT build failed. See the issues above
at /Users/angelamal/Documents/osome/node_modules/#ionic/app-scripts/dist/aot/aot-compiler.js:237:55
at step (/Users/angelamal/Documents/osome/node_modules/#ionic/app-scripts/dist/aot/aot-compiler.js:32:23)
at Object.next (/Users/angelamal/Documents/osome/node_modules/#ionic/app-scripts/dist/aot/aot-compiler.js:13:53)
at fulfilled (/Users/angelamal/Documents/osome/node_modules/#ionic/app-scripts/dist/aot/aot-compiler.js:4:58)
[ERROR] An error occurred while running subprocess ionic-app-scripts.
ionic-app-scripts build --prod --target cordova --platform android exited
with exit code 1.
While I try to build an android app in Ionic 3.
I used this command ionic cordova build android --prod --release
But it is showing an error. How to solve this?
Thanks in Advance
Ionic cordova build error
Command
cordova build android
Gives output:
Android Studio project detected
ANDROID_HOME=C:\Users\Clide\AppData\Local\Android\Sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_191
studio
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
[ERROR] An error occurred while running subprocess cordova.
cordova build android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.