【问题标题】:Error while do ` ionic cordova build android` fro ionic 3从离子3执行`ionic cordova build android`时出错
【发布时间】: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


【解决方案1】:

我也面临同样的问题..但是在 make 命令时它可以正常工作

$ ionic cordova build android  --stacktrace

【讨论】:

  • 这段代码是什么意思:ionic cordova build android --stacktrace`stacktrace` 是我们构建时要测量的内容
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-10-20
  • 2021-01-13
  • 2018-12-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多