1.安装java jdk去oracle公司下载
jdk-7u15-windows-i586.exehttp://www.oracle.com/technetwork/cn/java/javase/downloads/jdk7-downloads-1880260-zhs.html---C:\Documents and Settings\XXXX>java -versionjava version "1.7.0_15"Java(TM) SE Runtime Environment (build 1.7.0_15-b03)Java HotSpot(TM) Client VM (build 23.7-b01, mixed mode, sharing)2.解压安装eclipse,去eclipse官网下载eclipse-SDK-4.2.2-win32.ziphttp://www.eclipse.org/downloads/3.网络安装adt (估计要花几个小时) 选中eclipse的help->Install New Software 在界面点击add,在Location位置添加网址http://dl-ssl.google.com/android/eclipse 下载整个developer tools,一路安装到底 4.Android SDK(在第3步估计就安装好了) 中工具adb的路径查看sdk路径可以按如下方式查看:Window->Preferences->Android查看SDK Location举例我的adb路径如下:C:\Documents and Settings\XXXXX\android-sdks\platform-tools\adb.exe5.创建AVD(Android模拟器)Window->Android Virtual Device Manager->Android Virtual Device->New之后一通填写搞定6.创建项目File->Project->Android->Android Application Project一通填写(注意选择尺寸得注意,例如我选4.7寸的手机时占了电脑半个屏幕)7.编写源代码调出代码试图Window->Show View->Package Explorer选中项目->src->...->MainActivity.javapackage com.example.hello3;import android.os.Bundle;import android.app.Activity;import android.view.Menu;import android.widget.*; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView textView = new TextView(this); textView.setText("Hello Android!"); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } }
工作环境:
模拟器界面: