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
- Hello World!
- Hello World !
- Go - Hello WorldGo
- Deep "Hello world!"
- Hello Python worldPython
- Hello World探究
- Docker Hello WorldDocker
- dotnet hello world
- Go:Hello WorldGo
- ant Hello World
- I'm Hello World
- 輸出hello world
- RabbitMQ tutorial - "Hello world!"MQ
- WebGL 的 Hello WorldWeb
- react的”Hello World !“React
- Android OpenGL ES 2.0 手把手教學(1)- Hello World!Android
- Flutter Web 之 Hello WorldFlutterWeb
- [系列] Go gRPC Hello WorldGoRPC
- Hello World! XJ is here.
- 01-C++ "hello world"C++
- python輸出hello worldPython
- C# Hello,World(1)
- [WebAssembly 入門] Hello, world!Web
- RabbitMQ 入門 - Hello WorldMQ
- spring boot(一)hello worldSpring Boot
- 【Flutter 基礎】Hello WorldFlutter
- JMicro微服務Hello World微服務
- ROS之初見Hello WorldROS
- Android 基於Netty的訊息推送方案之Hello World(一)AndroidNetty
- PHPCPP安裝以及hello worldPHP
- Smali 語法解析——Hello World
- spring boot(一)hello world 搭建Spring Boot
- 深入分析 Hello World 程式
- C++20 module Hello worldC++
- React 學習之 Hello WorldReact
- Python基礎01 Hello World!Python