Problems with the Phonegap

Asked

Viewed 4,013 times

6

I discovered this Phonegap not long ago, but today I got the urge to meet him. Well, as I said on the site, I needed to download Nodejs and execute a command on the CMD for it to install Phonegap.

After this, I needed to create a folder so that Phonegap registers it as an application to be developed.

The website said I needed to run this in the project folder:

phonegap run android

But while executing the command, returned the following error in my CMD window:

E:\Outros\PhoneGap\fenix>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-androi
.git;a=snapshot;h=3.3.0;sf=tgz...
   [error] An error occured during creation of android sub-project.

C:\Users\iXaDe\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:126
                    throw e;
                          ^
Error: ERROR : executing command 'ant', make sure you have ant installed and ad
ed to your path.
    at C:\Users\iXaDe\.cordova\lib\android\cordova\3.3.0\bin\lib\check_reqs.js:
7:27
    at ChildProcess.exithandler (child_process.js:641:7)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:735:16)
    at Socket.<anonymous> (child_process.js:948:11)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Pipe.close (net.js:466:12)

EDIT

After installing the ant, phonegap still shows error:

  E:\Outros\PhoneGap\fenix>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\iXaDe\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:126
                       throw e;
                      ^
   Error: Please install Android target 19 (the Android newest SDK). Make sure you
   have the latest Android tools installed as well. Run "android" from your command
   -line to install/update any missing SDKs or tools.
       at C:\Users\iXaDe\.cordova\lib\android\cordova\3.3.0\bin\lib\check_reqs.js:8
   0:29
  • I’m not able to execute the command, even if I already had an application developed, I’m not able to run it.

  • Post the tutorial link you were following in your question.

  • By the way, two important readings for better use of Stack Overflow: http://answall.com/about and http://meta.answall.com/questions/good-subjective-bad-subjective

  • Bug says you don’t have the latest version of Android SDK. What version you have?

1 answer

7


Your mistake:

Error: Please install Android target 19 (the Android Newest SDK). Make sure you have the Latest Android tools installed as well. Run "android" from your command-line to install/update any Missing Sdks or tools.

Which translates into:

Error: Please install Android version 19 (the latest version of Android SDK). Also make sure you have the latest version of the Android tools installed as well. Run "android" from the command line to install/update any missing Sdks or tools.

Tell us your problem could be one of two:

  1. You have what you need installed but you don’t have the paths configured;
  2. You don’t have what it takes to install.


Deal with the paths

You have two ways to add the Android SDK to path windows. For the sake of clarity, let’s assume you have the facility at:

C:\android-sdk-windows\tools
  1. Commandline

    From the command line you can execute:

    set path=%path%;C:\android-sdk-windows\tools;
    
  2. Ambiente Gráfico

    You can access the environment variable configuration dialog and edit to add the desired path:

    1. Access:

      "My computer""Properties"Advanced""Environment Variables";

    2. Choose and edit the variable path:

      Captura de Tela

    3. At the end add the path:

      C:\ android-sdk-windows\tools;
      

      Particular attention to the use of ; to separate from existing paths.

      Captura de Tela


Install what’s missing

If you do not have the Android SDK, at least the requested version that is the 19, should install before checking the paths.

SDK Tools | Android Developers


And this is to deal with the mistake you are having. Other mistakes may arise after that, but it is another subject that deserves another question.

  • Even updating, still got error: Error executing "adb devices": 'adb' não é reconhecido como um comando interno&#xA;ou externo, um programa operável ou um arquivo em lotes.

  • @iXaDe I suggest you open a question asking how to resolve this error. Add the relevant information and steps you are taking that cause the error. Ps: I am glad that in the meantime this problem has been overcome.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.