当前位置 : 主页 > 手机开发 > cordova >

更新cordova后,离子生成android抛出“呃哦!”错误

来源:互联网 收集:自由互联 发布时间:2021-06-10
我刚刚通过sudo npm install -g cordova更新了cordova 现在我有问题,每当我尝试使用离子运行android – 设备构建Android应用程序时,我得到 Error during processing of action! Attempting to revert...ERROR running
我刚刚通过sudo npm install -g cordova更新了cordova

现在我有问题,每当我尝试使用离子运行android – 设备构建Android应用程序时,我得到

Error during processing of action! Attempting to revert...
ERROR running one or more of the platforms: TypeError: Uh oh!
Invalid Version: undefined
You may not have the required environment or OS to run this project

或离子构建android

Error during processing of action! Attempting to revert...
Error: Uh oh!
Invalid Version: undefined

IOS工作正常,所以我觉得这是android的问题?

Android SDK Tools: 24.3.4
Android SDK Platform-tools: 23.0.1
Android SDK Build-tools: 23.0.2
SDK: Android 5.1.1 (API 22)

组合我有:

Cordova CLI: 5.4.1
Ionic Version: 1.1.0
Ionic CLI Version: 1.7.10
Ionic App Lib Version: 0.6.5
ios-deploy version: 1.7.0 
ios-sim version: 4.1.1 
OS: Mac OS X El Capitan
Node Version: v0.12.7
Xcode version: Xcode 7.1 Build version 7B91b
缺少平台文件夹中的文件’platforms.json’.
运行命令以删除平台并添加平台.

$cordova platform rm android
$cordova platform add android

确认这适合您.

网友评论