android 开发 新建工程

[align=center][size=large][color=green][b]建立android工程[/b][/color][/size][/align]
[color=green]
[list]
[*]开发环境
[*]开发工具
[*]Android SDK下载
[*]新建工程
[*]工程结构介绍
[*]代码编写
[/list]
[/color]
[b]开发环境[/b]
android是以java 语言来编写实现其应用的,所以首先需要配置java的运行环境,网上有很多教程这里推荐一个[url]http://hi.baidu.com/sbsgap/item/5d666b137871cda1feded58a[/url]很详细的
[b]Android SDK下载[/b]
Android SDK可以到官网下载网址[url]http://developer.android.com/index.html[/url]
[b]开发工具[/b]
学过java的同学都知道,编写java程序大部分都是eclipse,android也是用eclipse,不过需要安装一个adt插件(Android developer tools),<[i]当然也不排除 其他的IDE工具 NetBeans IntelliJ IDEA [/i]>android adt方法[url]http://www.cnblogs.com/tianguook/archive/2012/09/22/2698184.html[/url]如果选择离线安装,请在安装的时候,断开网络,安装进度会很快
[b]新建工程[/b]
如果一切很顺利的话,那么你会在你的eclipse中看到
[img]http://dl.iteye.com/upload/attachment/0077/5777/08f5d654-be0b-35ac-b9ca-500703311586.jpg[/img]

要建立新的Android工程 还差一步 配置Android SDK
点击eclipse的windows-->Preference如下图

[img]http://dl.iteye.com/upload/attachment/0077/5780/b780f96e-9ca7-30b0-9785-9c9b7c19bbb9.jpg[/img]

[img]http://dl.iteye.com/upload/attachment/0077/5782/a84b7cf9-9fd3-3af2-b8c6-4b2273e1e4cd.jpg[/img]

经过以上步骤 好了 看看我们的Android工程吧
建立工程1.
[img]http://dl.iteye.com/upload/attachment/0077/5788/b1f47fa8-d390-3858-8454-b26ba1c6b5b9.jpg[/img]
Android 新工程信息

[img]http://dl.iteye.com/upload/attachment/0077/5784/c8aaa650-eee3-3dd4-923e-c80c2d35c852.jpg[/img]

[img]http://dl.iteye.com/upload/attachment/0077/5792/03dae86e-4dad-30ac-9ba8-d51983caabdf.jpg[/img]


android 工程介绍

[img]http://dl.iteye.com/upload/attachment/0077/5786/cd312ea8-2412-30a1-a205-9e992ce9d70e.jpg[/img]

编写简单代码 在屏幕中显示一个按钮 main.xml中编写

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_text"
/>

</LinearLayout>

建立模拟器

[img]http://dl.iteye.com/upload/attachment/0077/5800/d432fc69-4c08-32b4-8cc1-a81cf8df2971.jpg[/img]

模拟器信息

[img]http://dl.iteye.com/upload/attachment/0077/5794/6a273548-7284-3825-a006-0bcbea570a25.jpg[/img]

运行项目

[img]http://dl.iteye.com/upload/attachment/0077/5798/4679ff62-81eb-342c-8742-c16edbb086d2.jpg[/img]

效果


[img]http://dl.iteye.com/upload/attachment/0077/5790/d3cfca6c-01c3-3ad1-ac85-60ca95117ac9.jpg[/img]

这阵子想写博文了,总结一下自己,这个是开始,但不是结束,加油。。。。。。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值