2

I am trying to setup the environment to create phonegap applications. I've been trying to set up everything for a long time, but I don´t achieve it... All the Environment Variables are correct: JAVA_HOME, ANT_HOME, PATH.. And I deleted .cordoba from my User Folder, but I still get this error.

Can you Help me? I would really appreciate it!

Thanks!

C:\Users\Javier\pruebaiamvo>phonegap run android
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] adding the Android platform...
[phonegap] missing library cordova/android/3.3.0
[phonegap] downloading https://git-wip-us.apache.org/repos/asf?p=cordova-android
.git;a=snapshot;h=3.3.0;sf=tgz...
   [error] An error occured during creation of android sub-project.

C:\Users\Javier\.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\Javier\.cordova\lib\android\cordova\3.3.0\bin\lib\check_reqs.js:
87:29
at _rejected (C:\Users\Javier\.cordova\lib\android\cordova\3.3.0\bin\node_mo
dules\q\q.js:808:24)
at C:\Users\Javier\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.j
s:834:30
at Promise.when (C:\Users\Javier\.cordova\lib\android\cordova\3.3.0\bin\node
_modules\q\q.js:1079:31)
at Promise.promise.promiseDispatch (C:\Users\Javier\.cordova\lib\android\cor
dova\3.3.0\bin\node_modules\q\q.js:752:41)
at C:\Users\Javier\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.j
s:574:44
at flush (C:\Users\Javier\.cordova\lib\android\cordova\3.3.0\bin\node_module
s\q\q.js:108:17)
at process._tickCallback (node.js:415:13)
user1221392
  • 75
  • 1
  • 6
  • this is a duplicate of http://stackoverflow.com/questions/21062920/cant-run-phonegap-run-android-throws-exception – Belda Jan 13 '14 at 08:59

1 Answers1

0

You need to define XCOPY on your path as it is used by the internal node.js scripts to move things around.

You have xcopy.exe somewhere on your machine. You should be able to add %SystemRoot%\System32 to your PATH.

Or you can open up a terminal and type 'where xcopy' to see the actual path to your xcopy.exe.

I guess having XCOPY on the path is a requirement for setting up and installing Android, but it'd be nice if Cordova checked to make sure you have XCOPY somewhere...

This is also explained on post below-

An error occured during creation of android sub-project

Community
  • 1
  • 1
Mandeep Singh
  • 983
  • 8
  • 9