001.android环境搭建(集成的IDE搭建开发环境)
2013-03-19 17:48
741 查看
课程概要:android环境的搭建主要有以下三步:
1.android SDK的安装
2 .ADT的安装和配置
3.android模拟器的配置
Additional information:
如果你还没有JDK的话,可以去这里下载,接下来的工作就是安装提示一步一步走。设置环境变量步骤如下:(一般做java开发的一般都有了,哈哈,我用的是1.7)
我的电脑->属性->高级->环境变量->系统变量中添加以下环境变量:
JAVA_HOME值为: D:\Program Files\Java\jdk1.6.0_18(你安装JDK的目录)
CLASSPATH值为:.;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\bin;
Path: 在开始追加 %JAVA_HOME%\bin;
NOTE:前面四步设置环境变量对搭建Android开发环境不是必须的,可以跳过。
安装完成之后,可以在检查JDK是否安装成功。打开cmd窗口,输入java –version 查看JDK的版本信息。出现类似下面的画面表示安装成功了:
1.在上边的链接地址下载adt-bundle-windows-x86-20130219.zip集成开发包
2.解压,打开eclipse/运行eclipse.exe
3.选择 windows -》android SDK Manager -》下载相应的版本。如android2.3的镜像文件;因为我已经安装完了,如下图:下图的安装的时候都得选上。根据自己的需求,下载不同的包。
4.配置模拟器
启动eclipse --》window--》android virtual Device Manager 下面的操作按图走:
选择 -》New---》按照下面的填写,其中的target这一项不是手动填写,它的版本取决于第三步你所选择的下载版本,我的是android4.2.2(API17)所以target‘这里显示的是android 4.2.2 -API17
5.点击ok --》出现下图:选择refresh -》在选择start 即可
6.新建一个工程(和老版本的没有区别)
这里引用官方文档的步骤:
Click New
in
the toolbar.(or File -》new-》android Application project)
In the window that appears, open the Android folder, select Android Application
Project, and click Next.
Figure 1. The New Android App Project wizard in Eclipse.
Fill in the form that appears:
Application Name is the app name that appears to users. For this project, use "My First App."
Project Name is the name of your project directory and the name visible in Eclipse.
Package Name is the package namespace for your app (following the same rules as packages in the Java programming language). Your package name must be
unique across all packages installed on the Android system. For this reason, it's generally best if you use a name that begins with the reverse domain name of your organization or publisher entity. For this project, you can use something like "com.example.myfirstapp."
However, you cannot publish your app on Google Play using the "com.example" namespace.
Minimum Required SDK is the lowest version of Android that your app supports, indicated using the API
level. To support as many devices as possible, you should set this to the lowest version available that allows your app to provide its core feature set. If any feature of your app is possible only on newer versions of Android and it's not critical to the
app's core feature set, you can enable the feature only when running on the versions that support it (as discussed in Supporting
Different Platform Versions). Leave this set to the default value for this project.
Target SDK indicates the highest version of Android (also using the API
level) with which you have tested with your application.
As new versions of Android become available, you should test your app on the new version and update this value to match the latest API level in order to take advantage of new platform features.
Compile With is the platform version against which you will compile your app. By default, this is set to the latest version of Android available in your
SDK. (It should be Android 4.1 or greater; if you don't have such a version available, you must install one using the SDK
Manager). You can still build your app to support older versions, but setting the build target to the latest version allows you to enable new features and optimize your app for a great user experience on the latest devices.
Theme specifies the Android UI style to apply for your app. You can leave this alone.
Click Next.
On the next screen to configure the project, leave the default selections and click Next.
The next screen can help you create a launcher icon for your app.
You can customize an icon in several ways and the tool generates an icon for all screen densities. Before you publish your app, you should be sure your icon meets the specifications defined in the Iconography design
guide.
Click Next.
Now you can select an activity template from which to begin building your app.
For this project, select BlankActivity and click Next.
Leave all the details for the activity in their default state and click Finish.
run 的方式有两种:第一种:如图
第二种:
9.运行结果:证明环境答对了。
1.android SDK的安装
2 .ADT的安装和配置
3.android模拟器的配置
Additional information:
如果你还没有JDK的话,可以去这里下载,接下来的工作就是安装提示一步一步走。设置环境变量步骤如下:(一般做java开发的一般都有了,哈哈,我用的是1.7)
我的电脑->属性->高级->环境变量->系统变量中添加以下环境变量:
JAVA_HOME值为: D:\Program Files\Java\jdk1.6.0_18(你安装JDK的目录)
CLASSPATH值为:.;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\bin;
Path: 在开始追加 %JAVA_HOME%\bin;
NOTE:前面四步设置环境变量对搭建Android开发环境不是必须的,可以跳过。
安装完成之后,可以在检查JDK是否安装成功。打开cmd窗口,输入java –version 查看JDK的版本信息。出现类似下面的画面表示安装成功了:
原来安装android开发环境,要花几个小时,太纠结了,今天我查看了官方文档,发现了一个文档,原来发布了集成版的,昨天写的文档就全作废了,直接上最新的,最省事的吧,哈哈。经验教训:先看官方文档,再动手去做。不说废话了:点击http://developer.android.com/sdk/index.html#download,下载集成开发包。
1.在上边的链接地址下载adt-bundle-windows-x86-20130219.zip集成开发包2.解压,打开eclipse/运行eclipse.exe
3.选择 windows -》android SDK Manager -》下载相应的版本。如android2.3的镜像文件;因为我已经安装完了,如下图:下图的安装的时候都得选上。根据自己的需求,下载不同的包。
4.配置模拟器
启动eclipse --》window--》android virtual Device Manager 下面的操作按图走:
选择 -》New---》按照下面的填写,其中的target这一项不是手动填写,它的版本取决于第三步你所选择的下载版本,我的是android4.2.2(API17)所以target‘这里显示的是android 4.2.2 -API17
5.点击ok --》出现下图:选择refresh -》在选择start 即可
6.新建一个工程(和老版本的没有区别)
这里引用官方文档的步骤:
Click New
in
the toolbar.(or File -》new-》android Application project)
In the window that appears, open the Android folder, select Android Application
Project, and click Next.
Figure 1. The New Android App Project wizard in Eclipse.
Fill in the form that appears:
Application Name is the app name that appears to users. For this project, use "My First App."
Project Name is the name of your project directory and the name visible in Eclipse.
Package Name is the package namespace for your app (following the same rules as packages in the Java programming language). Your package name must be
unique across all packages installed on the Android system. For this reason, it's generally best if you use a name that begins with the reverse domain name of your organization or publisher entity. For this project, you can use something like "com.example.myfirstapp."
However, you cannot publish your app on Google Play using the "com.example" namespace.
Minimum Required SDK is the lowest version of Android that your app supports, indicated using the API
level. To support as many devices as possible, you should set this to the lowest version available that allows your app to provide its core feature set. If any feature of your app is possible only on newer versions of Android and it's not critical to the
app's core feature set, you can enable the feature only when running on the versions that support it (as discussed in Supporting
Different Platform Versions). Leave this set to the default value for this project.
Target SDK indicates the highest version of Android (also using the API
level) with which you have tested with your application.
As new versions of Android become available, you should test your app on the new version and update this value to match the latest API level in order to take advantage of new platform features.
Compile With is the platform version against which you will compile your app. By default, this is set to the latest version of Android available in your
SDK. (It should be Android 4.1 or greater; if you don't have such a version available, you must install one using the SDK
Manager). You can still build your app to support older versions, but setting the build target to the latest version allows you to enable new features and optimize your app for a great user experience on the latest devices.
Theme specifies the Android UI style to apply for your app. You can leave this alone.
Click Next.
On the next screen to configure the project, leave the default selections and click Next.
The next screen can help you create a launcher icon for your app.
You can customize an icon in several ways and the tool generates an icon for all screen densities. Before you publish your app, you should be sure your icon meets the specifications defined in the Iconography design
guide.
Click Next.
Now you can select an activity template from which to begin building your app.
For this project, select BlankActivity and click Next.
Leave all the details for the activity in their default state and click Finish.
run 的方式有两种:第一种:如图
第二种:
9.运行结果:证明环境答对了。
相关文章推荐
- Eclipse集成android开发环境(IDE)搭建 --再一次记录
- 【android】Eclipse集成android开发环境(IDE)搭建
- Android开发、测试持续集成环境Jenkins搭建
- 搭建Symbian开发环境--与多种IDE的集成
- 使用集成的ADT bundle来搭建android开发环境
- linux下android开发环境搭建及NDK安装[集成gcc编译器]
- Ubuntu 14.04下搭建 Android 开发环境(2) -SDK&IDE
- 三步快速搭建android开发环境 (下载包已集成可用sdk,无需费心到google相应网站下载,快哉!)
- Android-开发笔记-001_Android开发环境搭建
- windows和linux中搭建python集成开发环境IDE
- Eclipse IDE for Java EE 搭建 Android开发环境
- 搭建Windows系统下php开发环境有很多种方式,比如LAMP的配置、php IDE和调试工具的选择等等。根据每个人喜好不同有很多配置方式。这里主要介绍的是利用XAMPP集成安装和配置apache、
- Mac系统下cocos2d-x(iphone-android)及IDE的开发环境搭建
- 【云星数据---Apache Flink实战系列(精品版)】:Apache Flink实战基础0016--IDEA搭建非maven管理的集成开发环境001
- linux下android开发环境搭建及NDK安装[集成gcc编译器]
- Android开发基本环境搭建——IDE
- windows和linux中搭建python集成开发环境IDE——如何设置多个python环境