Android 开发环境搭建好了就要开发下,验证开发环境是否正常。来个知名的 HelloWorld 例子。

1、创建 android 项目:

create android project

create android project

然后点击完成。项目创建后,我这 eclilpse 项目里的 helloworld 有“红叉”(有错误),把 HelloWorld.java 改下名,再改回来,那个“红叉”就没了。不解,可能是 ide 问题。

2、创建模拟器,在手机那个图标,如:

android create avd

android create avd

3、有了个 helloworld 示例,就要运行。运行它不像平常的 java main 文件,右击运行“Java Application” 就可以,第一次要匹配。在 Run Configurations ... 里配置:

android run conf

android run conf

然后匹配如:

android run conf add

android run conf add

然后在这界面,点击 run。神奇的东西出现。

4、请耐心等待(时间比较长),其中会出现:

android starting

android starting

android starting 2

最后结果出现:

android helloworld

返回菜单有个 android 的 log / icon

android hello icon

android hello icon

这个 hello 没多少作用,只是看下 android 开发与运行是怎么样,有个认识。

更多相关文章

  1. [Android]安装环境
  2. ADT-bundle(Android Development Tools)环境配置
  3. (Android)搭建NDK开发环境 (二)
  4. Android Studio 4.0 - 创建新项目
  5. Android开发环境搭建教程

随机推荐

  1. Android中ListView中显示图片和文本
  2. android doc 国内镜像
  3. [每天学点Android开发]Building Web Apps
  4. Android P SystemUI之StatusBar加载流程
  5. android > 禁止横竖屏切换
  6. Android中丰富多彩的onTouch事件
  7. [Android]解决控件重叠、覆盖的问题
  8. Android图像处理
  9. android布局ui
  10. Android:EditText 常用属性