简体   繁体   中英

An error occurred while running subprocess cordova. Why?

I make mobile game on JS, and i use Ionic for build Android app. For adding to my project Android Platform i writed:

C:\TB>ionic cordova prepare android

But this back me:

? Platform android is not installed! Would you like to install it? Yes
> cordova.cmd platform add android --save

You have been opted out of telemetry. To change this, run: cordova telemetry on.
Using cordova-fetch for cordova-android@9.1.0
Adding android project...
Could not load API for android project C:\TB\node_modules\cordova-android
[ERROR] An error occurred while running subprocess cordova.

        cordova.cmd platform add android --save exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

At my node_modules folder have subfolder cordova-android, why ionic?! How can i fix this? PS My android SDK at needed folder AppData\\Local\\Android\\Sdk

尝试运行以下命令

ionic cordova platform rm android

ionic cordova platform add android

ionic cordova build android

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM