Android hello world实例

Android hello world example 展示了开发Android几个过程:

开发环境需要:JDK 1.6
Eclipse IDE 3.7 , Indigo
Android SDK

1.安装Install Android SDK
http://developer.android.com/sdk/index.html

2.安装Install ADT Eclipse plugin
在Eclipse的Help->Install New Software,输入https://dl-ssl.google.com/android/eclipse/

3.创建Create an Android Virtual Device (AVD)
在Eclipse工具条选择Android Virtual Device (AVD),点按new创建一个AVD。

4.创建Create Android Project with Eclipse (Wizard)
在Eclipse中File -> New -> Project….”, “Android Project“

5.编码Code it…
HelloWorldActivity.java


import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class HelloWorldActivity extends Activity {
/** Called when the activity is first created. */
@[author]Override[/author]
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

TextView text = new TextView(this);
text.setText(
"Hello World, Android - mkyong.com");
setContentView(text);
}
}

6.运行Start it in Android Virtual Device (AVD)

案例源码下载:
http://www.mkyong.com/wp-content/uploads/2011/11/Android-HelloWorld.zip

你这篇软文不咋滴,但是这个下载地址http://www.mkyong.com还是很有意思滴。
[该贴被lendo于2011-11-22 11:18修改过]
jidon开始移动了

我正在想,什么时候Spring之类的东西会有Android版本。