我正嘗試使用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