您的位置:首页 > 移动开发 > Android开发

Windows下搭建Android2.2开发环境

2011-02-03 16:33 375 查看
(1)在http://java.sun.com/javase/downloads/index.jsp下载JDK6,安装JDK,省略。安装完毕后,设置环境变量JAVA_HOME为jdk的安装目录,并且将%JAVA_HOME%/bin添加到系统Path变量中。

(2)下载Android SDK并配置。

可以到http://developer.android.com/sdk/index.html上下载android-sdk_r06-windows.zip,下载好后,解压缩到D盘。配置SDK,在Windows机器上,右键单击我的电脑,选择属性->高级,点“环境变量”按钮,修改“系统变量”下面的Path变量,把SDK tools的真实路径加入其中(即Android sdk 解压后的文件夹下的tool路径,在这里我是D:/program/android-sdk-windows/tools)。添加完后,可以在命令行下用命令测试:android --help,如果出现android的帮助命令就说明配置好了。

C:/>android --help
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)

where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.

-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: