Cordova无法添加Android失败,退出代码为ENOENT [英] Cordova cannot add Android failed with exit code ENOENT

查看:206
本文介绍了Cordova无法添加Android失败,退出代码为ENOENT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用Cordova创建一个Android项目,但是我得到一个ENOENT错误,虽然我按照一步一步一步一步非常仔细,这让我生气。
首先是错误的屏幕截图:

以下是有关我的软件和硬件/ os的信息:



硬件和操作系统:




  • Intel(R)Core(TM)i5-3230M CPU @ 2.60 GHz 2.60GHz

  • 4 GB RAM

  • 64位操作系统,x 64位处理器

  • Windows 8



<软件:
以下是相关软件命令行的一些输出。




  • $ npm - 版本

  • 输出:1.4.8

  • $ cordova -version

  • 输出:3.4.1-0.1 .0

  • $ ant -version

  • 输出:Apache Ant(TM)版本1.9.3于2013年12月23日编译

  • $ java -version






  • $ adb版本

  • Android Debug Bridge版本1.0.31



以下是我的一些系统变量:




  • 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

  • 路径:
    %JAVA_HOME%\bin; C:\app\barisa\product\11.2 .0 \dbhome_1\bin; C:\Program
    文件(x86)\Intel\iCLS客户端\; C:\Program文件\Intel\iCLS
    客户端\\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\; C:\Program
    文件\ Intent \ Intent(R)管理引擎组件\DAL; C:\Program
    Files\Intel\Intel(R)管理引擎组件\IPT; C:\Program
    文件(x86)\Intel\Intel(R)管理引擎
    组件\DAL; C:\程序文件(x86)\Intel \Intel \IPT; C:\Program Files \Microsoft\Web Platform
    Installer \; C:\Program Files(x86)\Microsoft ASP.NET\ASP.NET Web
    Pages \v1.0 \; c:\Program文件(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文件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\\\\\ C:\Program文件
    (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:\程序文件(x86)\Microsoft SQL
    Server \110\Tools\Binn\ManagementStudio\; C:\Program文件
    (x86)\Microsoft Visual Studio
    10.0 \Common7\IDE\PrivateAssemblies\; C:\Program文件(x86)\ Microsoft SQL
    服务器\110\DTS\Binn\;%ANT_HOME%\bin ; C:\adt-bundle-windows-x86_64-20140321\sdk\platform-tools; C:\adt-bundle-windows-x86_64-20140321\sdk\tools; C:\Program
    Files \\\
    odejs\


  • 注意:我在一些
    研究后将tools.jar从jdk / lib复制到jre /互联网。不工作。


  • 注意2:我给出命令cd
    C:\Users\barisa.cordova\lib\android \cordova\3.4.0\bin该文件夹中有一个
    check_reqs文件。但是如果我在
    命令行中键入$ chek_reqs,它说check_reqs不被识别为内部或
    外部命令....


  • 注意3:我打开命令propmt(cmd)右键 - >运行为
    管理员我应该怎么办?




有-d标志的额外信息:





更新



我清理了.cordova并重新安装,我得到这个错误:



我的变量是如上面定义的。

解决方案

如果你确定你的路径尝试键入android



然后添加到您的路径:

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

在某些情况下,不要忘记重新启动电脑。


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: 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

  • $ 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:\app\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) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\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-bundle-windows-x86_64-20140321\sdk\platform-tools;C:\adt-bundle-windows-x86_64-20140321\sdk\tools;C:\Program Files\nodejs\

  • 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:\Users\barisa.cordova\lib\android\cordova\3.4.0\bin" 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:

Update

I cleaned .cordova and reinstalled it and now, i am getting this error:

My variables are defined as indicated above.

解决方案

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%\System32\Wbem;

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

这篇关于Cordova无法添加Android失败,退出代码为ENOENT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆