Android hello world例項
Android hello world example 展示了開發Android幾個過程:
開發環境需要:JDK 1.6
Eclipse IDE 3.7 , Indigo
Android SDK
1.安裝Install Android SDK
6.執行Start it in Android Virtual Device (AVD)
案例原始碼下載:
開發環境需要: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); } } <p class="indent"> |
6.執行Start it in Android Virtual Device (AVD)
案例原始碼下載:
http://www.mkyong.com/wp-content/uploads/2011/11/Android-HelloWorld.zip
相關文章
- Hello, World
- Hello World!
- Hello World
- Go - Hello WorldGo
- Docker Hello WorldDocker
- 【Java】Hello worldJava
- React Hello,WorldReact
- Mockito Hello WorldMockito
- ant Hello World
- Deep "Hello world!"
- Go:Hello WorldGo
- Android RxJava使用介紹(一) Hello WorldAndroidRxJava
- Hello Python worldPython
- react的”Hello World !“React
- WebGL 的 Hello WorldWeb
- ABAP程式Hello World
- dotnet hello world
- RabbitMQ tutorial - "Hello world!"MQ
- 輸出hello world
- Flutter Web 之 Hello WorldFlutterWeb
- ROS之初見Hello WorldROS
- 【Flutter 基礎】Hello WorldFlutter
- JMicro微服務Hello World微服務
- 01-C++ "hello world"C++
- RabbitMQ 入門 - Hello WorldMQ
- [WebAssembly 入門] Hello, world!Web
- 機器學習,Hello World from Javascript!機器學習JavaScript
- Spring版Hello WorldSpring
- Play框架之Hello, World!框架
- C# Hello,World(1)
- hello world"你知多少------300種程式語言中的"hello world"程式匯
- fasthttp 概述與 Hello World(本文)ASTHTTP
- [系列] Go gRPC Hello WorldGoRPC
- PHPCPP安裝以及hello worldPHP
- spring boot(一)hello worldSpring Boot
- Smali 語法解析——Hello World
- C語言列印“Hello World“C語言
- 第一個程式Hello world