我只是在學習如何使用PhoneGap的以下this guide.Phonegap:創建android子項目時發生錯誤。 (OS X)
但是當我tryed做$ phonegap build android
這是我得到:
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] adding the Android platform...
[error] An error occured during creation of android sub-project.
/Users/myself/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:126
throw e;
^
Error: The command "android" failed. Make sure you have the latest Android SDK installed, and the "android" command (inside the tools/ folder) is added to your path.
at /Users/myself/.cordova/lib/android/cordova/3.3.0/bin/lib/check_reqs.js:85:29
at _rejected (/Users/myself/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:808:24)
at /Users/myself/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:834:30
at Promise.when (/Users/myself/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:1079:31)
at Promise.promise.promiseDispatch (/Users/myself/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:752:41)
at /Users/myself/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:574:44
at flush (/Users/myself/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:415:13)
任何想法?
PS:
我小白與PhoneGap的,紅寶石和NPM
您是否安裝了Android SDK,Ant,Java JDK並將它們添加到PATH變量中? –
問題在於Android SDK未添加到PATH中。謝謝@DavidAnderson – Sascuash