0
我試圖用節點命令管理器-npm創建帶有最新phonegap(3.3,http://phonegap.com/install/)的android項目,但是出現錯誤。怎麼了?構建phonegap項目時出現了什麼問題?
以下是錯誤消息:
C:\...\Documents\PHONEGAP\my-app>phonegap run 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.
C:\...\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:126
throw e;
^
Error: An error occurred while listing Android targets
at C:\...\.cordova\lib\android\cordova\3.3.0\bin\lib\check_reqs.js:8
7:29
at _rejected (C:\...\.cordova\lib\android\cordova\3.3.0\bin\node_mod
ules\q\q.js:808:24)
at C:\...\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js
:834:30
at Promise.when (C:\...\.cordova\lib\android\cordova\3.3.0\bin\node_
modules\q\q.js:1079:31)
at Promise.promise.promiseDispatch (C:\...\.cordova\lib\android\cord
ova\3.3.0\bin\node_modules\q\q.js:752:41)
at C:\...\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js
:574:44
at flush (C:\...\.cordova\lib\android\cordova\3.3.0\bin\node_modules
\q\q.js:108:17)
at process._tickCallback (node.js:415:13)
你安裝了android sdk 19嗎? – QuickFix
是的,我會檢查我在Android SDK上安裝了哪些東西 – marko
當我說sdk 19時,我的意思是啓動sdk管理器併爲API 19安裝組件「SDK Platform」。Phonegap 3.3配置target sdk 19.如果你在第一次啓動「phonegap run android」時沒有安裝sdk 19,請在重新測試之前嘗試刪除platforms/android文件夾。 – QuickFix