我正尝试使用phonegap create创建一个phonegap项目的android版本。Phonegap /科尔多瓦ANDROID_HOME已设置,但不会工作
我已经为ANDROID_HOME和PATH等设置了env变量,但它仍然不起作用。
我错过了什么吗?
MacBook-Pro-de-Guilherme-GM:ssgt guilhermegm$ echo $ANDROID_HOME
/usr/local/Cellar/android-sdk/23.0.2
MacBook-Pro-de-Guilherme-GM:ssgt guilhermegm$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/Cellar/android-sdk/23.0.2/platform-tools:/usr/local/Cellar/android-sdk/23.0.2/tools
MacBook-Pro-de-Guilherme-GM:ssgt guilhermegm$ sudo cordova build android
cp: no such file or directory: /Users/guilhermegm/Projects/ssgt/frontend/ssgt/icon.png
cp: no such file or directory: /Users/guilhermegm/Projects/ssgt/frontend/ssgt/www/res/icon/ios/icon-72.png
cp: no such file or directory: /Users/guilhermegm/Projects/ssgt/frontend/ssgt/www/res/icon/ios/icon-72-2x.png
Running command: /Users/guilhermegm/Projects/ssgt/frontend/ssgt/platforms/android/cordova/build
[Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.]
Error: /Users/guilhermegm/Projects/ssgt/frontend/ssgt/platforms/android/cordova/build: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:755:16)
at Process.ChildProcess._handle.onexit (child_process.js:822:5)
MacBook-Pro-de-Guilherme-GM:ssgt guilhermegm$
您能告诉我您是如何做到的吗? – 2014-12-08 09:02:10
在我的.bash_profile中,我添加了这些env。变量 – 2014-12-08 11:21:56
你的android sdk路径是什么? – 2014-12-08 11:23:36