Reputation: 63
Whenever I try to build a project using phonegap run
, I get the below error:
C:\Users\MS AwaN\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:\Users\MS AwaN\.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:\Users\MS AwaN\.cordova\lib\android\cordova\3.3.0\bin\lib\check_reqs.js:87:29
at _rejected (C:\Users\MS AwaN\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:808:24)
at C:\Users\MS AwaN\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:834:30
at Promise.when (C:\Users\MS AwaN\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:1079:31)
at Promise.promise.promiseDispatch (C:\Users\MS AwaN\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:752:41)
at C:\Users\MS AwaN\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:574:44
at flush (C:\Users\MS AwaN\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:108:17)
at process._tickCallback (node.js:415:13)
Can anyone please suggest what I am doing wrong?
Upvotes: 3
Views: 3987
Reputation: 173
I had the same problem and this fixed it. Alternately look here (which is the same but has a link to the documentation which I also missed).
Upvotes: 2
Reputation: 11721
It seems that phonegap 3.3 requires android sdk 19.
If you have a older one, try the following steps :
phonegap build android
and if it fails, run phonegap -V build android
to get more details on the errorUpvotes: 0