加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

cocos2dx3.3 android实现ant打包问题集锦

发布时间:2020-12-14 19:42:54 所属栏目:百科 来源:网络整理
导读:1.安装jdk BUILD FAILED /home/bilal/tmp/ant/build.xml:19: 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 "/usr/lib/jvm/java-6-openjdk/jr

1.安装jdk

BUILD FAILED /home/bilal/tmp/ant/build.xml:19: 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 "/usr/lib/jvm/java-6-openjdk/jre"

增加一个JAVA_HOME的环境变量,指向jdk的路径C:Program FilesJavajdk1.8.0_05 (这里必须是jdk的路径,不能是jre的路径)


2.安装ant

http://ant.apache.org/bindownload.cgi

在环境变量path里面指向ant的解压目录即可

3.在ant release之前需要更新android工程的配置

android update project -p . -t 1

-t:target id,可以如下获取:
./tools/android list target
Available Android targets:
id: 1 or "android-14"
Name: Android 4.0.1
Type: Platform
API level: 14
Revision: 2
Skins: HVGA,WQVGA432,WVGA800 (default),WXGA720,QVGA,WSVGA,WQVGA400,WXGA800,WVGA854

-n:工程名字
-p:工程路径

sdk.dir is missing.错误就是没有执行这句命令

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读