本文共 513 字,大约阅读时间需要 1 分钟。
模拟器安装好之后,接下来开发Andorid的第一例子。操作过程如下:
1、新建一个Andorid工程
2、点击“Next”,输入应用名
3、点击“Next”,选择Android的版本。
4、点击“Next”,输入应用名称(显示在应用图标下方的名称)、包名(在Android应用中,报名作为应用的唯一标示)、Activity(窗口,也是应用的入口)、最小的SDK版本(如果不输入,代表可以在任意Android版本上运行),然后点击“Finish”。
5、编译之后,项目就创建出来了。
6、接下将项目部署到模拟器上,有两种方法:A、点击项目右键,选择“Run AS”-->"Android Application"。 B、通过SDK中的adb工具。在命令窗口下进入SDK的tools
目录,输入命令“adb install C:\XXX.apk”。
卸载应用,也有两种方式:A、通过模拟器上的应用管理器进行卸载。 B、通过SDK中的adb工具。在命令窗口下进入SDK的tools目录,输入命令“adb uninstall <应用的包名>”,例如“adb uninstall com.cooper.app”。
运行之后,显示如下界面