AI开发实战1-App Inventor的编译
来源:互联网 发布:win共享mac桌面 编辑:程序博客网 时间:2024/05/20 22:30
1 App Inventor的编译
编译AppInventor需要使用ant,在项目的GitHub上https://github.com/mit-cml/appinventor-sources有如下说明:
Youwill need a full Java JDK (6 or 7, preferably from Oracle; JRE is not enough)and Python to compile and run the servers.
需要在电脑上安装JDK6或7,才能正常编译。
但ant的不同版本需要的JDK不同,像1.10.1版本就需要JDK8,否则编译的时候,会报如下错误:
Exception in thread "main"java.lang.UnsupportedClassVersionError: org/apache/tools/ant/launch/Launcher :Unsupported major.minor version 52.0
编译的时候,直接输入ant命令,会编译所有源码,花费时间较长,在本人电脑上是6分钟多。实际往往不需要编译全部代码,只编译改动的模块就可以了。
在源码的appinventor文件夹下有个build.xml文件,在其中有许多target标签:
<target name="all">
<ant inheritAll="false" useNativeBasedir="true"dir="appengine"/>
<ant inheritAll="false" useNativeBasedir="true"dir="blocklyeditor"/>
<ant inheritAll="false" useNativeBasedir="true"dir="common"/>
<ant inheritAll="false" useNativeBasedir="true"dir="buildserver"/>
<ant inheritAll="false" useNativeBasedir="true"dir="components"/>
<ant inheritAll="false" useNativeBasedir="true"dir="buildserver" target="PlayApp"/>
</target>
…
<target name="MakeAuthKey">
…
<target name="comps">
…
<target name="extensions">
…
<target name="clean">
<ant inheritAll="false" useNativeBasedir="true"dir="appengine" target="clean"/>
<ant inheritAll="false"useNativeBasedir="true" dir="blocklyeditor"target="clean"/>
<ant inheritAll="false" useNativeBasedir="true"dir="aimerger" target="clean"/>
<ant inheritAll="false" useNativeBasedir="true"dir="buildserver" target="clean"/>
<ant inheritAll="false" useNativeBasedir="true"dir="common" target="clean"/>
<ant inheritAll="false" useNativeBasedir="true"dir="components" target="clean"/>
<delete dir="build"/>
<delete dir="reports"/>
</target>
每个target标签中间说明了使用ant + target name时,编译的模块,如输入如下命令:
ant all——编译所有模块,等同于只输入ant
antextensions——编译插件
antMakeAuthKey——编译AuthKey
还有个特殊的编译命令:
antclean——删除之前编译生成的build和reports文件夹。
- AI开发实战1-App Inventor的编译
- Android app inventor 开发感受
- MIT app inventor 开发蓝牙发送app
- AI开发实战2-定制自己的AI伴侣
- Android在线开发工具 App Inventor
- Android在线开发工具 App Inventor
- 屌丝也能开发安卓版2048(App Inventor)
- 1.App Inventor开发环境构建
- app inventor开发日记(一)
- App Inventor
- APP inventor
- App Inventor 模拟器问题的解决
- App Inventor (4-1) 透過藍牙傳送訊號給 Arduino
- AI开发实战11-加密功能插件的开发
- MIT推出Android应用开发工具App Inventor
- App inventor(android开发工具)中文入门使用手册
- 使用MIT App Inventor 2开发Android应用
- AI开发实战4-文本输入框(TextBox)的定制1
- [模板] 树堆
- NLP深度学习 —— CS224学习笔记 1
- css常用样式
- Cafee 安装时编译错误的解决及Makefile配置文件参考
- Xampp中怎么修改Apache服务器的端口号
- AI开发实战1-App Inventor的编译
- 1811: Tree Intersection
- 用telnet测试通过pop3读取163邮箱邮件
- Friend-Graph
- HDU 6156 Palindrome Function
- Hexadecimal's Numbers CodeForces
- HDU6156 Palindrome Function[数位DP]
- 【leetcode】第36题 Valid Sudoku 题目+解析+代码
- MySql java 中文乱码问题彻底解决 MAC