码迷,mamicode.com
首页 > 移动开发 > 详细

Eclipse中使用Ant打Android包报错及解决方案

时间:2016-04-14 07:04:27      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:ant打包出错   eclipse ant   

问题描述:

在Eclipse中运行ant批量打包工具出错,日志信息如下:    
D:\Android\android-sdk-windows\tools\ant\build.xml:601: The following error occurred while executing this line:    
D:\Android\android-sdk-windows\tools\ant\build.xml:720: The following error occurred while executing this line:    
D:\Android\android-sdk-windows\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:\Program Files\Java\jre7″

 

解决方案:

Eclipse菜单 – Window – Preferences – Java – Installed JREs – 选中栏目表格中的jre项 – Edit – Add External JARs – 选择jdk目录/lib/tools.jar - 确认其加入JRE system libraries– Finish – OK

 

 

 

如有任何疑问,请发送邮箱至237722726@qq.com,感谢您的阅读


本文出自 “小夜夜” 博客,请务必保留此出处http://237722726.blog.51cto.com/6114043/1763566

Eclipse中使用Ant打Android包报错及解决方案

标签:ant打包出错   eclipse ant   

原文地址:http://237722726.blog.51cto.com/6114043/1763566

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!