简体   繁体   English

运行子进程cordova 时出错。 为什么?

[英]An error occurred while running subprocess cordova. Why?

I make mobile game on JS, and i use Ionic for build Android app.我在 JS 上制作手机游戏,我使用 Ionic 来构建 Android 应用程序。 For adding to my project Android Platform i writed:为了添加到我的项目 Android 平台,我写道:

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?!在我的 node_modules 文件夹中有子文件夹cordova-android,为什么是ionic?! How can i fix this?我怎样才能解决这个问题? PS My android SDK at needed folder AppData\\Local\\Android\\Sdk PS 我的 android SDK 在需要的文件夹 AppData\\Local\\Android\\Sdk

尝试运行以下命令

ionic cordova platform rm android

ionic cordova platform add android

ionic cordova build android

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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