所以我瘋了 - 似乎是無窮的,當談到科爾多瓦/ phonegap。Cordova Android平臺添加Android錯誤3.3
在Mac OS X小牛我想添加Android作爲一個平臺...
所以很自然,我去......
$ cordova platform add android
我得到這個錯誤...
Creating android project...
Error: An error occured during creation of android sub-project.
/Users/jasonstockton/.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/jasonstockton/.cordova/lib/android/cordova/3.3.0/bin/lib/check_reqs.js:85:29
at _rejected (/Users/jasonstockton/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:808:24)
at /Users/jasonstockton/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:834:30
at Promise.when (/Users/jasonstockton/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:1079:31)
at Promise.promise.promiseDispatch (/Users/jasonstockton/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:752:41)
at /Users/jasonstockton/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:574:44
at flush (/Users/jasonstockton/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:415:13)
at /usr/local/lib/node_modules/cordova/src/platform.js:282:30
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Socket.<anonymous> (child_process.js:956:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
繼續給我「你需要添加路徑」的迴應。我已經這樣做了(因此我失去了理智)。
我的.bash_profile看起來像這樣...
export PATH=/usr/local/bin:$PATH
export PATH=${PATH}:/Development/adt-bundle-mac/sdk/platform-tools:/Development/adt-bundle-mac/sdk/tools
export PATH=/Applications/MAMP/bin/php/php5.5.3/bin:$PATH
注意第二行是平臺工具。我已經嘗試了其他項目,並沒有運氣。我在每次更新之後調用source〜/ .bash_profile - 也重啓了終端和計算機,但沒有運氣。
爲了謹慎起見,我檢查了所有的文件都通過終端,只是發生了不可能的事情發生,Finder在說謊的目錄。文件似乎都在那裏...
Jasons-MacBook-Pro:~ jasonstockton$ cd Development/adt-bundle-mac/sdk/platform-tools
Jasons-MacBook-Pro:platform-tools jasonstockton$ ls
NOTICE.txt adb api fastboot source.properties systrace
Jasons-MacBook-Pro:platform-tools jasonstockton$ cd
Jasons-MacBook-Pro:~ jasonstockton$ cd Development/adt-bundle-mac/sdk/tools
Jasons-MacBook-Pro:tools jasonstockton$ ls
Jet apps emulator-arm emulator64-x86 lib proguard traceview
NOTICE.txt ddms emulator-mips etc1tool lint source.properties uiautomatorviewer
adb_has_moved.txt dmtracedump emulator-x86 hierarchyviewer mksdcard sqlite3 zipalign
android draw9patch emulator64-arm hprof-conv monitor support
ant emulator emulator64-mips jobb monkeyrunner templates
我然後不停谷歌搜索,發現另一個忠告是建議更新.profile文件爲好。我的.profile文件看起來像這樣...
PATH=$PATH:/Development/adt-bundle-mac/sdk/platform-tools:/Development/adt-bundle-mac/sdk/tools
export PATH
仍然收到相同的錯誤。我嘗試在其他應用程序上運行,但仍然遇到問題。
我看別的地方調用設置,看看它實際上已經集...這是我設定的路徑看起來像......
PATH=/Applications/MAMP/bin/php/php5.5.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Development/adt-bundle-mac/sdk/platform-tools:/Development/adt-bundle-mac/sdk/tools
如果任何人都可以擺脫對我可能有些光做錯了,這將是驚人的!我超級迷失和困惑。該應用程序都準備好了iOS只是想爲Android做一個版本。應該是直接前...
在此先感謝您的幫助!
該消息顯示「請確保您已安裝最新的Android SDK」。您是否在Android SDK管理器中安裝了「API19的SDK平臺」? OMG! – QuickFix