【问题标题】:Phonegap android build error on macosxmacOS上的Phonegap android构建错误
【发布时间】:2015-05-28 19:54:17
【问题描述】:

我正在尝试从我的 phonegap 项目构建一个 apk。当我运行phonegap build android 时,我得到Error: EPERM, operation not permitted 错误所以我尝试sudo phonegap build android 但我得到这个错误:

[Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.]

当我运行 sudo android 时,我得到了 android 管理器,因此我正确导出了 android 路径。那有什么问题呢?

这是我的 .profile 文件的一部分:

export ANDROID_HOME=/Users/Iman/Documents/SDKs/android-sdk-macosx
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

【问题讨论】:

    标签: android cordova terminal phonegap-build


    【解决方案1】:

    对于 OSX:

    export ANDROID_HOME=/<installation location>/android-sdk-macosx
    export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
    

    在此处参考安装指南:http://spring.io/guides/gs/android/

    【讨论】:

    • 我认为我的导出和你的导出是相同的,但是当我将phonegap build android 与 sudo 一起使用时,我仍然会收到该错误。
    猜你喜欢
    • 2017-03-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-11
    • 1970-01-01
    • 2013-11-04
    • 2016-02-19
    相关资源
    最近更新 更多