Cordoba cannot add Android with ENOENT exit code

I am trying to create an Android project with Cordova, however I get an ENOENT error, although I followed the tutorial very closely, it makes me angry. First up is a screenshot of the error: enter image description here Here is information about my / os hardware and software:

Hardware and OS:

  • Intel (R) Core (TM) i5-3230M CPU @ 2.60 GHz 2.60 GHz
  • RAM 4 GB
  • 64-bit operating system, 64 x processor
  • Windows 8

Software: Here are some of my command line output for related software.

  • $ npm -version
  • Output: 1.4.8
  • $ cordova -version
  • Output: 3.4.1-0.1.0
  • $ ant -version
  • Exit: Apache Ant (TM) version 1.9.3, compiled December 23, 2013
  • $ java -version

enter image description here

  • $ adb version
  • Output: Android Debug Bridge version 1.0.31

Here are some of my system variables:

  • ANDROID_HOME: C: \ adt-bundle-windows-x86_64-20140321 \ sdk
  • ANT_HOME: C: \ apache- ant -1.9.3
  • JAVA_HOME: C: \ Program Files \ Java \ jdk1.8.0_05
  • CLASSPATH:% JAVA_HOME% \ jre \ lib
  • PATH:% JAVA_HOME% \ Bin; C: \ application \ barisa \ product \ 11.2.0 \ dbhome_1 \ Bin; C: \ Program Files (x86) \ Intel \ iCLS Client \; C: \ Program Files \ Intel \ iCLS Client \;% SystemRoot% \ system32;% SystemRoot%;% SystemRoot% \ System32 \ Wbem;% SystemRoot% \ System32 \ WindowsPowerShell \ v1.0 \; C: \ Program Files \ Intel \ Intel (R) Components of the control engine \ DAL; C: \ Program Files \ Intel \ Intel (R) Components Engine Engine Engine \ IPT; C: \ Program Files (x86) \ Intel \ Intel (R) Components \ DAL; C: \ Program Files (x86) \ Intel \ Intel (R) Management Components Engine \ IPT; C: \ Program Files \ Microsoft \ Web Platform Installer \; C: \ Program Files (x86) \ Microsoft ASP.NET \ ASP.NET Web Pages \ v1.0 \; c: \ Program Files (x86) \ Microsoft SQL Server \ 100 \ Tools \ Binn \; c: \ Program Files \ Microsoft SQL Server \ 100 \ Tools \ Binn \; c: \ Program Files \ Microsoft SQL Server \ 100 \ DTS \ Binn \; C: \ Program Files (x86) \ Windows Kits \ 8.0 \ Windows Performance Toolkit \; C: \ Program Files (x86) \ Microsoft SQL Server \ 80 \ Tools \ Binn \; C: \ Program Files \ Microsoft SQL Server \ 90 \ Tools \ binn \; C: \ Program Files (x86) \ Microsoft SQL Server \ 90 \ Tools \ binn \; C: \ Program Files (x86) \ Microsoft SQL Server \ 90 \ DTS \ Binn \; C: \ Program Files (x86) \ Microsoft SQL Server \ 90 \ Tools \ Binn \ VSShell \ Common7 \ IDE \; C: \ Program Files (x86) \ Microsoft Visual Studio 8 \ Common7 \ IDE \ PrivateAssemblies \; C: \ Program Files (x86) \ Microsoft SQL Server \ 100 \ Tools \ Binn \ VSShell \ Common7 \ IDE \; C: \ Program Files (x86) \ Microsoft Visual Studio 9.0 \ Common7 \ IDE \ PrivateAssemblies \; C: \ Program Files (x86) \ Microsoft SQL Server \ 100 \ DTS \ Binn \; C: \ Program Files \ Microsoft SQL Server \ 110 \ DTS \ Binn \; C: \ Program Files (x86) \ Microsoft SQL Server \ 110 \ Tools \ Binn \; C: \ Program Files \ Microsoft SQL Server \ 110 \ Tools \ Binn \; C: \ Program Files (x86) \ Microsoft SQL Server \ 110 \ Tools \ Binn \ ManagementStudio \; C: \ Program Files (x86) \ Microsoft Visual Studio 10.0 \ Common7 \ IDE \ PrivateAssemblies \; C: \ Program Files (x86) \ Microsoft SQL Server \ 110 \ DTS \ Binn \;% ANT_HOME% \ Bin; C: \ ADT-window-bundle-x86_64-20140321 \ SDK \ platform tools; C: \ ADT-window-bundle-x86_64-20140321 \ SDK \ tools; C: \ Program Files \ nodejs \

  • Note. I copied tools.jar from jdk / lib to jre / lib after some research on the internet. Does not work.

  • Note 2: I give the command "cd C: \ Users \ barisa.cordova \ lib \ android \ cordova \ 3.4.0 \ bin" There is check_reqs in this folder. However, if I type $ chek_reqs at the command line it says: "check_reqs is not recognized as an internal or external command ...."

  • Note 3: I opened the propmt (cmd) command by right-clicking β†’ starting the administrator What should I do?

Additional information with the -d flag:

enter image description here

Update

I cleaned .cordova and reinstall it, and now, I get this error: enter image description here

My variables are defined as above.

+6
android path cordova cordova-3
May 2 '14 at 7:27
source share
8 answers

If you are confident in your paths, try entering android in cmd if it says: "xcopy" was not recognized.

then add to your path:

%SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem; 

In some cases, be sure to restart your computer.

+5
Jul 02 '15 at 6:48
source share

In my case, I just needed to add "C: \ Windows \ System32" to my window path.

+2
Dec 04 '15 at 12:14
source share

I had a similar problem when trying an ion platform add android.

result; partial assembly with an ENOENT error called "cordova-plugin-console" on the same child process as mentioned above superspawn.js

After trying to reinstall, etc. without permission, I changed my path variables. ANDROID_HOME was placed in user variables -

C:\Users\XXXXXX\AppData\Local\Android\android-sdk

PATH was updated in system variables to remove previous entries for the SDK and added at the end; %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Windows\System32;C:\Users\XXXXXX\Node\;C:\Users\XXXXX\AppData\Local\Android\android-sdk\tools;C:\Users\XXXXXX\AppData\Local\Android\android-sdk\platform-tools;

Restart the computer, test it using the new ionic start <new folder> tabs cd application in the created folder, test it ionic serve --lab exit with q, then try adding the platform. ionic platform add android

now it works.

Please note that ********* now that I run "android" in CMD from my user directory ... C:\Users\XXXXX>android

I do not see xcopy not found on my screen. The Android SDK manager always loads before and still after I changed my paths.

Hope this helps ps. I am running these cmds from my non-admin user, as I never log in or use my computer as an administrator.

+2
Mar 22 '16 at 15:49
source share

Try the following:

  • run the command: npm remove cordova -g
  • delete folder: C: \ Users \ your-name \ .cordova
  • reinstall cordova: npm install -g cordova
  • now go to the project folder and try again: cordova add android platform
+1
Aug 12 '14 at 10:37
source share

Make sure that if you created PATH as a system variable, you must run the Command Prompt as an administrator.

I created PATH as a user variable and would get the same error when tryin started as administrator.

+1
Sep 17 '15 at 17:06
source share

In my case, the problem was a custom TEMP variable. There were two folders.

TEMP-path does not work:

 %USERPROFILE%\AppData\Local\Temp;C:\php 

Working TEMP path:

  %USERPROFILE%\AppData\Local\Temp 

After that, everything worked fine!

+1
Feb 12 '16 at 9:26
source share

I had the same error with the previous version with cord version 3.1. Go to the path to the C: \ Program Files \ nodejs directory and then install your cord. Sometimes a cordova cannot connect to the correct npm path due to a conflict. Then create your project and add the android.Hope platform, this solution works for you too.

0
May 2 '14 at 7:57
source share

I just run cmd using Administrator and execute the command 'cordova platform add android' and now it works fine.

0
Sep 13 '17 at 8:36 on
source share



All Articles