WINDOWS上Android开发环境搭建
参考书籍PDF教程
Android开发教程.pdf
开发者首页
http://developer.android.com/
以上真正的首页不能访问
镜像:http://androidappdocs.appspot.com/index.html
中文:http://www.android123.com.cn/android_kit.html
参考别人的BLOG http://g.52cd.net/510.shtml
安装文档 http://androidappdocs.appspot.com/sdk/installing.html
1.updating
Install Android 1.6 SDK or later and then use SDK and AVD manager tool to update to Android 2.2.
2.Preparing Your Development Computer
install JDK and eclipse (we should install eclipse first and then we can install the eclipse plug-in Android Development Tools(ADT) plug-in).
3.Downloading the SDK Starter Package and install android sdk
http://androidappdocs.appspot.com/sdk/index.html
we got 2 files: android-sdk-windows-1.6_r1.zip, android-sdk_r06-windows.zip from URL
http://dl.google.com/android/archives/android-sdk-windows-1.6_r1.zip
http://dl.google.com/android/android-sdk_r06-windows.zip
unzip the file android-sdk-windows-1.6_r1.zip to c driver C:\android-sdk-windows-1.6_r1
set the env ANDROID_HOME=C:\android-sdk-windows-1.6_r1
add this to the path=C:\android-sdk-windows-1.6_r1\tools
and then go to the command line, you can type >android -help to verify you have install everything well.
4.install eclipse plug-in ADT and set to Android SDK
eclipse plugin ADT URL:
https://dl-ssl.google.com/android/eclipse/
set eclipse plug-in to find the right SDK.
[References]----> [Android] -----> Browse the location of SDK we just installed:C:\android-sdk-windows-1.6_r1------>[OK]
5. unzip SDK Setup and install SDK 2.2
unzip file android-sdk_r06-windows.zip and we got directory android-sdk-windows, and then move it to the right place.
click the SDK Setup.exe and follow the rules http://www.android123.com.cn/zhongwensdk/366.html
[update All]------[accept All]
after that I found that we can do the update in eclipse [Window] ------> [Android SDK and AVD Manager]
6. create a new project helloworld
eclipse menu [New] ----[Project] -------[Android]-------[Android Project]
project name: easyandroid
Build Target: Android 2.2
Application name: Hello
Package name: com.sillycat.easyandroid
Create Activity: Hello
Min SDK Version: 8
[Next] ------ [Finish]
I modify the Hello.java like this:
package com.sillycat.easyandroid;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class Hello extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setContentView(R.layout.main);
TextView tv = new TextView(this);
tv.setText("This is test about say hello to Carl!");
setContentView(tv);
}
}
select the project and run as Android Application------> add new Android Virtual Device
Name: android2.2
Target:Android 2.2 - API Level 8
SD Card: Size 64 Mib
[Create AVD]
And after that we can see the Hello in the menus and click it turn to the hello world view.