在Eclipse 3.7中搭建Android開發環境,收藏一下,準備學習android開發

一、下載Eclipse3.7,登陸http://www.eclipse.org/downloads/,下載Eclipse Classic 3.7: javascript

498)this.width=498;' onmousewheel = 'javascript:return big(this)' width="480" src="http://images.51cto.com/files/uploadimg/20120228/1043220.png" alt="下載Eclipse Classic 3.7" />

二、安裝ADT插件:下載好Eclipse後解壓,運行Eclipse,第一次運行會提示設置workspace;在菜單欄選擇Help—Install New Software,在Work with欄輸入http://dl-ssl.google.com/android/eclipse/並回車,稍後顯示以下圖: html

百搜技術:http://www.baisoujs.com 本人推薦學習資料網 java

498)this.width=498;' onmousewheel = 'javascript:return big(this)' width="480" src="http://images.51cto.com/files/uploadimg/20120228/1043221.png" alt="在Work with欄輸入http://dl-ssl.google.com/android/eclipse/並回車" />

選擇Select All按鈕,單擊Next——Next,選中「I Accept (此處略去若干字)」,再單擊Finish,開始安裝插件: android

498)this.width=498;' onmousewheel = 'javascript:return big(this)' width="480" src="http://images.51cto.com/files/uploadimg/20120228/1043222.png" alt="開始安裝插件" />

安裝期間會提示「Warning(此處略去若干字)」,選擇OK。安裝完成後選擇Restart,重啓Eclispe。 web

此時選擇Window,會出現以下選項: windows

電子書下載 eclipse

498)this.width=498;' onmousewheel = 'javascript:return big(this)' width="229" height="80" border="1" src="http://images.51cto.com/files/uploadimg/20120228/1043223.png" alt="選擇Window,會出現的選項" />

而且Preference窗口中會出現Android選項,說明ADT插件安裝成功。 學習

三、安裝Android SDK:登陸http://developer.android.com/sdk/index.html,下載android-sdk_r12-windows.zip: this

498)this.width=498;' onmousewheel = 'javascript:return big(this)' width="480" src="http://images.51cto.com/files/uploadimg/20120228/1043224.png" alt="下載android-sdk_r12-windows.zip" />

獲得的是一個壓縮包,解壓到D盤根目錄下。這裏請注意,解壓以後的SDK Manager.exe文件的絕對地址不要帶有空格,不然後面啓動模擬器的時候會有以下報錯: google

invalid command-line parameter: Filesandroid-sdk-windowstools/emulator-arm.exe.

Hint: use '@foo ' to launch a virtual device named 'foo'.

please use -help for more information

這裏文件的絕地地址是D:android-sdk-windowsSDK Manager.exe。

四、運行D:android-sdk-windowsSDK Manager.exe,會自動檢查更新。咱們下載的android-sdk_r12-windows.zip僅僅是冰山一角,咱們還要下載安裝整個冰山。

498)this.width=498;' onmousewheel = 'javascript:return big(this)' width="480" src="http://images.51cto.com/files/uploadimg/20120228/1043225.png" alt="下載安裝所有" />

在上圖中,你能夠直接選擇Install或者選擇Accept All以後再選擇Install。我是全選的,接下來的安裝過程持續了幾個小時,必定要淡定。

五、安裝完畢後,關閉SDK Manager.exe。運行Eclipse,選擇Window——Preference——Android,在SDK Location選擇D:android-sdk-windows,單擊Apply後在Target Name中選擇Android 2.3.3,單擊OK,以關閉Preference對話框。

六、建立Android模擬器:在Eclipse中選擇Window——Android SDK and AVD Manager,在對話框的左邊選中Virtual decices,單擊右部的New按鈕(你可能須要把對話框拉寬才能看見這個按鈕),仿照下圖填寫參數:

498)this.width=498;' onmousewheel = 'javascript:return big(this)' width="480" src="http://images.51cto.com/files/uploadimg/20120228/1043226.png" alt="填寫參數" />

單擊Create AVD按鈕,完成模擬器的建立。

七、在Android SDK and AVD Manager窗口選中Android2.3.3,單擊Start,彈出對話框以設定參數。爲了使模擬器大小適中,能夠仿照下圖填寫參數:

498)this.width=498;' onmousewheel = 'javascript:return big(this)' width="260" height="317" border="1" src="http://images.51cto.com/files/uploadimg/20120228/1043227.png" alt="填寫參數" />

設定參數後,單擊Launch,啓動模擬器:

498)this.width=498;' onmousewheel = 'javascript:return big(this)' width="480" src="http://images.51cto.com/files/uploadimg/20120228/1043228.jpg" alt="啓動模擬器" />

上圖顯示的模擬器我進行了一些設置,如時區選擇、語言選擇。

至此,環境搭建完畢,可以進行開發了。

文章出自:http://www.baisoujs.com/detail_137070722804622.html

相關文章
相關標籤/搜索