make 发表于 2014-7-31 18:05:35

cordova build 编译失败

    Created dir: D:\AppServ\www\phonegap\helloword\platforms\android\Cor
dovaLib\ant-build\classes
    Created dir: D:\AppServ\www\phonegap\helloword\platforms\android\Cor
dovaLib\ant-build\dexedLibs
    ----------
    Resolving Dependencies for CordovaLib...
Library dependencies:
No Libraries

------------------

-code-gen:
Merging AndroidManifest files into one.
Manifest merger disabled. Using project manifest only.
    Handling aidl files...
    No AIDL files to compile.
    ----------
    Handling RenderScript files...
    ----------
    Handling Resources...
    Generating resource IDs...
    ----------
    Handling BuildConfig class...
Generating BuildConfig class.

-pre-compile:

-compile:

BUILD FAILED
D:\eclipse\sdk\tools\ant\build.xml:601: The following error occurred while execu
ting this line:
D:\eclipse\sdk\tools\ant\build.xml:720: The following error occurred while execu
ting this line:
D:\eclipse\sdk\tools\ant\build.xml:734: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "D:\java7\jar7"

Total time: 2 seconds
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,D:\AppServ\www\phone
gap\helloword\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir
=ant-gen
Error: D:\AppServ\www\phonegap\helloword\platforms\android\cordova\build.bat: Co
mmand failed with exit code 2
    at ChildProcess.whenDone (C:\Users\Auser\AppData\Roaming\npm\node_modules\co
rdova\node_modules\cordova-lib\src\cordova\superspawn.js:135:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:755:16)
    at Process.ChildProcess._handle.onexit (child_process.js:822:5)


admin 发表于 2014-7-31 23:39:17

D:\eclipse\sdk\tools\ant\build.xml:734: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.


jdk环境变量看看配置了没有可以看看教程 或者教程里面的文档

http://bbs.phonegap100.com/thread-668-1-1.html

make 发表于 2014-8-1 07:58:22

本帖最后由 make 于 2014-8-1 09:04 编辑

admin 发表于 2014-7-31 23:39
D:\eclipse\sdk\tools\ant\build.xml:734: Unable to find a javac compiler;
com.sun.tools.javac.Main is ...
就是按照您的教程来的   javajavacant都通过..
补充: 找到问题原因了   自己犯二了 http://blog.csdn.net/sun1956/article/details/8760239
页: [1]
查看完整版本: cordova build 编译失败