12592

Error while adding android platform for cordova

Question:

D:\Shabbir\AndroidTest>cordova platform add android Creating android project... C:\Documents and Settings\avaya11\Application Data\npm\node_modules\cordova\node _modules\q\q.js:126 throw e; ^ Error: An error occured during creation of android sub-project. C:\Documents and Settings\avaya11\.cordova\lib\android\cordova\3.3.0\bin\node_mo dules\q\q.js:126 throw e; ^ Error: An error occurred while listing Android targets at C:\Documents and Settings\avaya11\.cordova\lib\android\cordova\3.3.0\bin\ lib\check_reqs.js:87:29 at _rejected (C:\Documents and Settings\avaya11\.cordova\lib\android\cordova \3.3.0\bin\node_modules\q\q.js:808:24) at C:\Documents and Settings\avaya11\.cordova\lib\android\cordova\3.3.0\bin\ node_modules\q\q.js:834:30 at Promise.when (C:\Documents and Settings\avaya11\.cordova\lib\android\cord ova\3.3.0\bin\node_modules\q\q.js:1079:31) at Promise.promise.promiseDispatch (C:\Documents and Settings\avaya11\.cordo va\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:752:41) at C:\Documents and Settings\avaya11\.cordova\lib\android\cordova\3.3.0\bin\ node_modules\q\q.js:574:44 at flush (C:\Documents and Settings\avaya11\.cordova\lib\android\cordova\3.3 .0\bin\node_modules\q\q.js:108:17) at process._tickCallback (node.js:415:13) at C:\Documents and Settings\avaya11\Application Data\npm\node_modules\cordo va\src\platform.js:244:30 at ChildProcess.exithandler (child_process.js:641:7) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:743:16) at Process.ChildProcess._handle.onexit (child_process.js:810:5) D:\Shabbir\AndroidTest>

This Error I got

I downloaded NodeJS and install Following

npm -g install phonegap npm -g install cordova npm -g install plugman npm -g install ant

I set some path for that

PATH C:\Documents and Settings\avaya11\Application Data\npm;C:\Documents and Settings\avaya11\Application Data\npm\node_modules\ant;C:\NEW ANDROID\sdk\platforms;C:\NEW ANDROID\sdk\platform-tools;C:\Documents and Settings\avaya11\Application Data\npm\node_modules\ant\bin;C:\Program Files\Java\jdk1.6.0_45\bin

this is ANT_HOME path that i downloaded from <a href="http://apache.claz.org//ant/binaries/apache-ant-1.9.3-bin.zip" rel="nofollow">here</a>

ANT_HOME C:\Program Files\Java\apache-ant-1.9.3

also added JAVA_HOME , ANDROID_HOME

I did all possible ways but still found error PLZ help me to find solution I think I confused to set a path.

Answer1:

After so much research work I found the answer.

I have not set path of the xcopy.

<strong>xcopy.exe</strong> - this file contains sdk platform information. So I added path of this. xcopy.exe is located in system32 folder.

So I added path like this and I able to add android platform.

%SystemRoot%\System32;

Answer2:

this path issues

Click on the Start menu in the lower-left corner of the desktop, right-click on Computer, then click Properties.

Click Advanced System Settings in the column on the left.

In the resulting dialog box, press Environment Variables.

Select the PATH variable and press Edit.

Append the following to the PATH based on where you installed the SDK, for example

C:\Development\adt-bundle\sdk\platform-tools;C:\Development\adt-bundle\sdk\tools

<a href="http://docs.phonegap.com/en/3.3.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide" rel="nofollow">refer</a>

<a href="http://teusink.blogspot.in/2013/07/guide-phonegap-3-android-windows.html" rel="nofollow">here for windows</a>

Recommend

  • AttributeTargetElements = MulticastTargets.Method isn't respected?
  • when trying to configure or rebuild node-gyp, getting errors: mac osx mavericks
  • ERROR : No emulator images (avds) found thrown on windows 8 while opening emulator
  • spawn ENOENT error
  • Child component not emitting value to parent component's function
  • sails-mongo auth error in sails 0.10
  • Error: socket hang up
  • ConnectionManager getDataSource undefined method
  • Cordova 3.4.0-0.1.3 adding android platform Error
  • Angular2 fire click event on unknown html element
  • gulp Cannot find module 'readable-stream/transform'
  • Bidrectional node/python communication
  • XGBoost installation issues for Python Anaconda Windows 10 (18 May 2018)
  • Convert PDF to PNG Node.JS
  • Web Action returns HTTP 200 response with empty body
  • Node ES6 class event emitter function?
  • Error building libxmljs for node.js
  • NodeJs/Formidable, Uploading Images error
  • Datatable ImportRow
  • Standard way for writing a debug mode in C++
  • How to send None with Signals across threads?
  • Socket io in node app on google app engine
  • select function not working in 3.5.4 version of d3.js
  • Cut the background to expose the layer below
  • Passing variable arguments using PowerShell's Start-Process cmdlet
  • Detecting null parameter in preprocessor macro
  • aapt.exe'' finished with non-zero exit value 1
  • Redshift Querying: error xx000 disk full redshift
  • Git describe fails to return most recent annotated tag
  • Can someone please explain to me in the most layman terms how to use EventArgs?
  • Adding elements to a huge XML file
  • Object and struct member access and address offset calculation
  • how to display data from 1st point on words on y axis for line chart in d3.js
  • How can I sort a a table with VBA with given text condition?
  • Row Count Is Returning the incorrect number using RaptureXML
  • Updating server-side rendering client-side
  • WinForms: two way TextBox problem
  • Understanding cpu registers
  • How do I configure my settings file to work with unit tests?
  • How do I use LINQ to get all the Items that have a particular SubItem?