I'm trying to use Phonegap for the first time, but I'm having problems.
I already had NodeJS installed, I was able to install Phonegap with npm install phonegap
with no problems. Then, as suggests , I created an app with phonegap create myapp
without problems, but when trying to run with phonegap run android
I got the following error :
C:\Users\MEU_USUÁRIO\Desktop\myapp>phonegap run android
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] adding the Android platform...
C:\Users\MEU_USUÁRIO\.cordova\lib\android\cordova.5.1\bin\node_modules\q\q.js:126
throw e;
^ Error: ERROR : executing command 'ant', make sure you have ant installed and add ed to your path.
at C:\Users\MEU_USUÁRIO\.cordova\lib\android\cordova.5.1\bin\lib\check_reqs.js: 47:27
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:465:12) { [Error: C:\Users\MEU_USUÁRIO\.cordova\lib\android\cordova.5.1\bin\create.bat: Com mand failed with exit code 8] code: 8 } [error] C:\Users\MEU_USUÁRIO\.cordova\lib\android\cordova.5.1\bin\create.bat: Co mmand failed with exit code 8
Searching the web, there are several different solutions, apparently each solution works for a different case. I tried npm install cordova
, set JAVA_HOME
, ANDROID_HOME
, Path
, installed Ant and set ANT_HOME
e nothing said served me, I continue with the same error.
The solution presented this other question did not serve me. I do not know what else to do.
Remember that AndroidSDK + Eclipse was already installed and worked before I even installed Phonegap. I'm using Windows 7.