PhoneGap中文网

 找回密码
 立即注册
查看: 21095|回复: 2
打印 上一主题 下一主题

cordova build 编译失败

[复制链接]

2

主题

18

帖子

82

积分

注册会员

Rank: 2

积分
82
跳转到指定楼层
楼主
发表于 2014-7-31 18:05:35 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    [mkdir] Created dir: D:\AppServ\www\phonegap\helloword\platforms\android\Cor
dovaLib\ant-build\classes
    [mkdir] Created dir: D:\AppServ\www\phonegap\helloword\platforms\android\Cor
dovaLib\ant-build\dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for cordovaLib...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] 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)


回复

使用道具 举报

493

主题

2035

帖子

6894

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
6894
沙发
发表于 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
回复 支持 反对

使用道具 举报

2

主题

18

帖子

82

积分

注册会员

Rank: 2

积分
82
板凳
 楼主| 发表于 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 ...

就是按照您的教程来的   java  javac  ant  都通过..
补充: 找到问题原因了   自己犯二了 http://blog.csdn.net/sun1956/article/details/8760239
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

ionic4视频教程

Archiver|手机版|小黑屋| PhoneGap中文网 ( 京ICP备13027796号-1 )  

GMT+8, 2025-1-8 06:36 , Processed in 0.060493 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表