Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
122 views
in Technique[技术] by (71.8m points)

Cordova cannot add Android failed with exit code ENOENT

I am trying to create an Android project with Cordova, however i am getting an ENOENT error although i followed the tutorial step by step very carefully, this is getting me angry. First this is the screenshot of the error: enter image description here Here are information about my software and hardware/os:

Hardware and OS:

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

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

  • $ npm -version
  • Output: 1.4.8
  • $ cordova -version
  • Output: 3.4.1-0.1.0
  • $ ant -version
  • Output: Apache Ant(TM) Version 1.9.3 compiled on 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-20140321sdk
  • ANT_HOME: C:apache-ant-1.9.3
  • JAVA_HOME: C:Program FilesJavajdk1.8.0_05
  • CLASSPATH: %JAVA_HOME%jrelib
  • PATH: %JAVA_HOME%in;C:apparisaproduct11.2.0dbhome_1in;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;%SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem;%SYSTEMROOT%System32WindowsPowerShellv1.0;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesMicrosoftWeb Platform Installer;C:Program Files (x86)Microsoft ASP.NETASP.NET Web Pagesv1.0;c:Program Files (x86)Microsoft SQL Server100ToolsBinn;c:Program FilesMicrosoft SQL Server100ToolsBinn;c:Program FilesMicrosoft SQL Server100DTSBinn;C:Program Files (x86)Windows Kits8.0Windows Performance Toolkit;C:Program Files (x86)Microsoft SQL Server80ToolsBinn;C:Program FilesMicrosoft SQL Server90Toolsinn;C:Program Files (x86)Microsoft SQL Server90Toolsinn;C:Program Files (x86)Microsoft SQL Server90DTSBinn;C:Program Files (x86)Microsoft SQL Server90ToolsBinnVSShellCommon7IDE;C:Program Files (x86)Microsoft Visual Studio 8Common7IDEPrivateAssemblies;C:Program Files (x86)Microsoft SQL Server100ToolsBinnVSShellCommon7IDE;C:Program Files (x86)Microsoft Visual Studio 9.0Common7IDEPrivateAssemblies;C:Program Files (x86)Microsoft SQL Server100DTSBinn;C:Program FilesMicrosoft SQL Server110DTSBinn;C:Program Files (x86)Microsoft SQL Server110ToolsBinn;C:Program FilesMicrosoft SQL Server110ToolsBinn;C:Program Files (x86)Microsoft SQL Server110ToolsBinnManagementStudio;C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDEPrivateAssemblies;C:Program Files (x86)Microsoft SQL Server110DTSBinn;%ANT_HOME%in;C:adt-bundle-windows-x86_64-20140321sdkplatform-tools;C:adt-bundle-windows-x86_64-20140321sdkools;C:Program Files odejs

  • Note: I copied the tools.jar from jdk/lib to jre/lib after some research on the internet. Not working.

  • Note 2: I give the command "cd C:Usersarisa.cordovalibandroidcordova3.4.0in" There is a check_reqs file in that folder. However if i type $ chek_reqs in the command line it says "check_reqs is not recognized as an internal or external command ...."

  • Note 3: I opened command propmt (cmd) by right click -> run as administrator What should i do?

Extra information with -d flag:

enter image description here

Update

I cleaned .cordova and reinstalled it and now, i am getting this error: enter image description here

My variables are defined as indicated above.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If you are sure of yours paths try to type android in cmd if it says: 'xcopy' was not recognized.

then add to your path:

%SystemRoot%system32; %SystemRoot%; %SystemRoot%System32Wbem;

In certain cases, don't forget to reboot the PC.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...