【发布时间】:2017-05-31 02:26:50
【问题描述】:
当我执行build for android 不知道该怎么做时,我收到此错误。我尝试删除平台并再次添加。但仍然得到同样的错误。我是否需要删除我的 android sdk 并在我的 mac 中重新安装它?
我的错误:
✖ Running command - failed!
[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova build android (exit code 1):
ANDROID_HOME=/Users/apple/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
FAILURE: Build failed with an exception.
* What went wrong:
Failed to load native library 'libnative-platform.dylib' for Mac OS X x86_64.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: /Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/bin/gradle: Command failed with exit code 1
【问题讨论】:
-
你有没有解决这个错误@hybrid Dev
-
@Mohan Gopi 我尝试过的事情: 1. 我创建了新项目并复制了 www 文件夹,然后我又做了“sudo ionic cordova build android”。这次它工作正常
-
@MohanGopi 如果您再次遇到此错误:请执行
npm install -g ionic@latest$ npm install --save-dev --save-exact @ionic/cli-plugin-ionic1@latest @ionic/cli-plugin-cordova@latest然后执行“suod ionic cordova build android`”
标签: cordova ionic-framework android-sdk-2.3