我正在尝试从我的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
答案 0 :(得分:0)
对于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/