WINDOWS上Android开发环境搭建

本文详细介绍了如何在Windows环境下搭建Android开发环境,包括安装JDK、Eclipse及ADT插件,下载并配置Android SDK等步骤。同时提供了创建首个Android项目的实战指导。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值