• 在java.sun.com下載JDK并安裝。
• 在“系統(tǒng)屬性”的“高級”選項(xiàng)卡中點(diǎn)擊“環(huán)境變量”,然后添加如下系 " /> 老司机av,日韩伊人,网站免费满18成年在线观看

一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

關(guān)于Android開發(fā)環(huán)境的構(gòu)建方法總結(jié)

 本方法適用于Android SDK 2.1環(huán)境下的程序開發(fā)

安裝JDK
•    在Java.sun.com下載JDK并安裝。
•    在“系統(tǒng)屬性”的“高級”選項(xiàng)卡中點(diǎn)擊“環(huán)境變量”,然后添加如下系統(tǒng)環(huán)境變量: 

1.  在PATH環(huán)境變量后追加 JDK安裝路徑中的bin路徑,本機(jī)為:

C:/Program Files/Java/jdk1.6.0_18/bin

2.    新建CLASSPATH環(huán)境變量或在CLASSPATH環(huán)境變量后追加JDK安裝路徑中的lib路徑和demo路徑,本機(jī)為:

C:/Program Files/Java/jdk1.6.0_18/demo;C:/Program Files/Java/jdk1.6.0_18/lib

安裝Eclipse
•    在eclipse.org下載Eclipse IDE for Java Developers的Windows 32bit版本。
•    下載完成后解壓即可使用。

安裝Android SDK OR 離線安裝
•    在Android Developers下載Android-sdk_r05-windows.zip,下載完成后解壓到任意路徑。
•    運(yùn)行SDK Setup.exe,點(diǎn)擊Available Packages,如果沒有出現(xiàn)可安裝的包請點(diǎn)擊Settings,選中Misc中的"Force https://..."這項(xiàng),再點(diǎn)擊Available Packages 。
•    選擇希望安裝的SDK及其文檔或者其它包,點(diǎn)擊Installation Selected、Accept All、Install Accepted,開始下載安裝所選包
•    添加SDK安裝目錄中的tools文件夾路徑至系統(tǒng)PATH環(huán)境變量,本機(jī)為:
C:/Android/Android-sdk-windows/tools

關(guān)于離線安裝 

用上面方法更新的時(shí)候速度很慢。

更要等很久。所以我們可以直接把那些包下載下來安裝。
地址就是
https://dl-ssl.google.com/androi ... 2.0_r01-windows.zip
https://dl-ssl.google.com/androi ... 2.1_r01-windows.zip
https://dl-ssl.google.com/androi ... -1.1_r1-windows.zip
https://dl-ssl.google.com/androi ... 1.5_r03-windows.zip
https://dl-ssl.google.com/androi ... 1.6_r02-windows.zip
https://dl-ssl.google.com/androi ... ver_r03-windows.zip
https://dl-ssl.google.com/androi ... ogle_apis-6_r01.zip
https://dl-ssl.google.com/androi ... ogle_apis-5_r01.zip
https://dl-ssl.google.com/androi ... ogle_apis-4_r02.zip
https://dl-ssl.google.com/androi ... ogle_apis-7_r01.zip

下完之后,
名字以Android的,解壓到platforms里面;
以google_apis開頭的,解壓到addons里面。
usb驅(qū)動(dòng)的,直接解壓到根目錄。

安裝Eclipse插件 ADT
•    Start Eclipse, then select Help > Install New Software.
•    In the Available Software dialog, click Add...
•    In the Add Site dialog that appears, enter a name for the remote site (for example, "Android Plugin") in the "Name" field.
In the "Location" field, enter this URL:
https://dl-ssl.google.com/Android/eclipse/
如果無法通過上面的地址獲得插件,可將https替換為http。(https is preferred for security reasons)
•    Back in the Available Software view, you should now see "Developer Tools" added to the list.
•    Select the checkbox next to Developer Tools, which will automatically select the nested tools Android DDMS and Android Development Tools. Click Next.
•    In the resulting Install Details dialog, the Android DDMS and Android Development Tools features are listed.
•    Click Next to read and accept the license agreement and install any dependencies, then click Finish.
•    Restart Eclipse. 

配置ADT 

在Eclipse中:
•    選擇Window > Preferences...
•    在左邊的面板選擇Android,然后在右側(cè)點(diǎn)擊Browse...并選中SDK路徑,本機(jī)為:
C:/Android/Android-sdk-windows
•    點(diǎn)擊Apply、OK。配置完成。 

創(chuàng)建AVD 

為使Android應(yīng)用程序可以在模擬器上運(yùn)行,必須創(chuàng)建AVD。
•    在Eclipse中。選擇Windows > Android SDK and AVD Manager
•    點(diǎn)擊左側(cè)面板的Virtual Devices,在右側(cè)點(diǎn)擊New
•    填入Name,選擇Target的API,SD Card大小任意,Skin隨便選,Hardware目前保持默認(rèn)值
•    點(diǎn)擊Create AVD即可完成創(chuàng)建AVD

Create a New Android Project 

After you've created an AVD, the next step is to start a new Android project in Eclipse.
1.    From Eclipse, select File > New > Project.
If the ADT Plugin for Eclipse has been successfully installed, the resulting dialog should have a folder labeled "Android" which should contain "Android Project". (After you create one or more Android projects, an entry for "Android XML File" will also be available.)
2.    Select "Android Project" and click Next.
3.    Fill in the project details with the following values:
o    Project name: HelloAndroid
o    Application name: Hello, Android
o    Package name: com.example.helloAndroid (or your own private namespace)
o    Create Activity: HelloAndroid
o    Min SDK Version: 7
Click Finish.

Here is a description of each field: 

Project Name
This is the Eclipse Project name — the name of the directory that will contain the project files.
Application Name
This is the human-readable title for your application — the name that will appear on the Android device.
Package Name
This is the package namespace (following the same rules as for packages in the Java programming language) that you want all your source code to reside under. This also sets the package name under which the stub Activity will be generated.
Your package name must be unique across all packages installed on the Android system; for this reason, it's very important to use a standard domain-style package for your applications. The example above uses the "com.example" namespace, which is a namespace reserved for example documentation — when you develop your own applications, you should use a namespace that's appropriate to your organization or entity.

Create Activity 

This is the name for the class stub that will be generated by the plugin. This will be a subclass of Android's Activity class. An Activity is simply a class that can run and do work. It can create a UI if it chooses, but it doesn't need to. As the checkbox suggests, this is optional, but an Activity is almost always used as the basis for an application.
Min SDK Version(這個(gè)是設(shè)置程序希望運(yùn)行在的系統(tǒng)版本)
==================================
Tips: 這里的Min SDK Version會(huì)根據(jù)我們選擇的Build Target改變,
      表示程序?qū)⑦\(yùn)行在哪個(gè)系統(tǒng)版本之上,對應(yīng)的數(shù)值關(guān)系如下:
           Android 1.5:Level API 3
           Android 1.6:Level API 4
           Android 2.01:Level API 6
           Android 2.1:Level API 7
      我們這里選擇Android 2.1,故Min SDK Version為7

==================================
This value specifies the minimum API Level required by your application. If the API Level entered here matches the API Level provided by one of the available targets, then that Build Target will be automatically selected (in this case, entering "2" as the API Level will select the Android 1.1 target). With each new version of the Android system image and Android SDK, there have likely been additions or changes made to the APIs. When this occurs, a new API Level is assigned to the system image to regulate which applications are allowed to be run. If an application requires an API Level that is higher than the level supported by the device, then the application will not be installed.
Other fields: The checkbox for "Use default location" allows you to change the location on disk where the project's files will be generated and stored. "Build Target" is the platform target that your application will be compiled against (this should be selected automatically, based on your Min SDK Version).
Notice that the "Build Target" you've selected uses the Android 1.1 platform. This means that your application will be compiled against the Android 1.1 platform library. If you recall, the AVD created above runs on the Android 1.5 platform. These don't have to match; Android applications are forward-compatible, so an application built against the 1.1 platform library will run normally on the 1.5 platform. The reverse is not true.
Your Android project is now ready. It should be visible in the Package Explorer on the left. Open the HelloAndroid.Java file, located inside HelloAndroid > src > com.example.helloAndroid).
It should look like this:

下面是點(diǎn)完Finish按鈕之后自動(dòng)生成的代碼:

package com.example.helloAndroid;
import Android.app.Activity;
import Android.os.Bundle;
public class HelloAndroid extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}

it知識(shí)庫關(guān)于Android開發(fā)環(huán)境的構(gòu)建方法總結(jié),轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請第一時(shí)間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 日本精品久久久一区二区三区 | 精品麻豆视频 | 另类文字小说图片 | 欧美大成色www永久网站 | 欧美xxx喷水 | 秋霞影音先锋一区二区 | 亚洲经典在线中文字幕 | 日本免费一区二区三区a区 日本免费一区二区三区看片 | 国产午夜亚洲精品不卡福利 | 久九九久福利精品视频视频 | 亚洲精品影院 | 国产在线精品一区二区三区不卡 | 国产xxx在线 | 唐人社电亚洲一区二区三区 | 日本精品一区二区三区在线视频| 日韩欧美成人乱码一在线 | 免费看一级做a爰片久久 | 国产精品第 | 一级做a爰片久久毛片美女 一级做a爰片久久毛片人呢 | 香港三级欧美国产精品 | 国产精品视频自拍 | 丁香婷婷六月天 | 成人在线免费视频 | 伊人中文在线 | 亚洲综合激情六月婷婷在线观看 | 国产人成精品综合欧美成人 | 久久免费视频3 | 国产精品 第1页 | 欧美国产一区二区二区 | 日韩亚洲欧洲在线rrrr片 | 免费观看四虎精品国产永久 | 亚洲国产成人综合 | 久久精品这里热有精品2015 | 色婷婷综合激情 | 在线播放黄色 | 国产精品欧美日韩精品 | 国产精品3| 亚洲欧美一区二区久久 | 99久久精品免费视频 | 久久国产欧美日韩精品免费 | 一级毛片中文字幕 |