Error while do ` ionic cordova build android` fro ionic 3

限于喜欢 提交于 2019-12-25 09:43:26

问题


I am getting this error when i do build for android dont know what to do. I tried remove platform and add it again. But still getting same error. Should i need to remove my android sdk and install it again in my mac ?

my error :

✖ 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

回答1:


I am also facing same issue .. but it work fine with me when make command

$ ionic cordova build android  --stacktrace


来源:https://stackoverflow.com/questions/43916498/error-while-do-ionic-cordova-build-android-fro-ionic-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!