科尔多瓦/ PhoneGap的生成错误 [英] Cordova/PhoneGap Build Error

查看:249
本文介绍了科尔多瓦/ PhoneGap的生成错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到的时候我试图建立我的PhoneGap项目下面的错误。

I am getting the following error when I am trying to build my phonegap project.

D:\LWMobile\hello>cordova build android
.
.
.

BUILD FAILED
C:\AndroidSDK\adtbundle\sdk\tools\ant\build.xml:601: The following
d while executing this line:
C:\AndroidSDK\adtbundle\sdk\tools\ant\build.xml:720: The following
d while executing this line:
C:\AndroidSDK\adtbundle\sdk\tools\ant\build.xml:734: Class not foun

Total time: 2 seconds
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,D:\LWMo
atforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=an
Error: D:\LWMobile\hello\platforms\android\cordova\build.bat: Comma
h exit code 2
    at ChildProcess.whenDone (C:\Users\aniruddha.b\AppData\Roaming\
les\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:135:
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Process.ChildProcess._handle.onexit (child_process.js:823:5)

我的64位机器上已经安装了JDK 8 64位。
下面是我的系统路径变量:

ANT_HOME: C:\Users\aniruddha.b\AppData\Roaming\npm\node_modules\ant\ant
JAVA_HOME: C:\Program Files\Java\jdk1.8.0_20
CLASSPATH: C:\Program Files\Java\jdk1.8.0_20\lib

PATH: %JAVA_HOME%\bin;
C:\AndroidSDK\adtbundle\sdk\platform-tools;
C:\AndroidSDK\adtbundle\sdk\tools;
C:\Program Files\nodejs\;
%ANT_HOME%\bin;

我的项目的路径是:D:\\ LWMobile \\你好

My Project path is: D:\LWMobile\hello

你好是该项目的文件夹

推荐答案

的问题是与蚂蚁的版本与您的Java版本不兼容问题。

The issue is with the incompatibility of the Ant version with your Java version.

您有蚂蚁的版本是1.8.4。 JDK 8 - 仅支持蚂蚁1.9安培;更大

Ant version you have is 1.8.4. JDK 8 - supports only Ant 1.9 & greater

卸载JDK8并恢复到JDK7

Uninstall JDK8 and revert back to JDK7

这篇关于科尔多瓦/ PhoneGap的生成错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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