Android 命令行下的编译和运行
2010-02-24 04:25:00 来源:WEB开发网核心提示:执行后终端输出如下:Buildfile: build.xmldirs:[mkdir] Created dir: /home/wangtao/Documents/android/hutaow/bin/classesresource-src:[echo] Generating R.java...aidl:compile:[
执行后终端输出如下:
Buildfile: build.xml
dirs:
[mkdir] Created dir: /home/wangtao/Documents/android/hutaow/bin/classes
resource-src:
[echo] Generating R.java...
aidl:
compile:
[javac] Compiling 2 source files to /home/wangtao/Documents/android/hutaow/bin/classes
dex:
package-res:
package-res-no-assets:
[echo] Packaging resources...
package-dex:
[echo] Packaging dex...
package:
BUILD SUCCESSFUL
Total time: 6 seconds
3、程序的运行及调试:
这里要用到的工具是android的调试工具adb,由它来完成程序的安装工作。首先在命令行输入"emulator"启动android模拟器。
然后等模拟器完全启动好后,执行"adb install bin/example.apk",即将example.apk安装到模拟器中。
最终在模拟器的"Applications"分类中找到"example"执行程序。
执行后终端输出如下:
* daemon not running. starting it now *
33 KB/s (4170 bytes in 0.120s)
更多精彩
赞助商链接