在Mac OS上配置Android開發環境

來源:互聯網
上載者:User

標籤:

1) 安裝配置NDK
1.1 下載NDK並解壓縮

下載路徑
https://developer.android.com/tools/sdk/ndk/index.html

在terminal執行:
chmod a+x android-ndk-r10d-darwin-x86_64.bin
./android-ndk-r10d-darwin-x86_64.bin


1.2 設定NDK的路徑到系統內容變數
/etc/profile檔案中添加變數
terminal執行
sudo su
chmod +w /etc/profile
vi /etc/profile
插入
export PATH=$PATH:/android-ndk-r10d-darwin-x86_64.bin/:/android-ndk-r10d/platform-tools/
儲存退出
chmod -w /etc/profile

現在已經可以用ndk-build進行編譯了,可以使用adb命令


2) 下載並安裝Eclipse
http://www.eclipse.org/downloads/?


3) 安裝Android Developer Tools(ADT)
https://developer.android.com/sdk/installing/installing-adt.html


3.1 運行Eclipse, 進入菜單Help->Install New Software
3.2 點擊右邊的“Add”按鈕,輸入https://dl-ssl.google.com/android/eclipse/
3.3 一路next,安裝完成後重啟Eclipse
3.4 進入菜單”Preference”->Android設定NDK安裝路徑


4) 安裝SDK package
4.1) 在Eclipse中進入Android SDK Manager
4.2) 選擇需要安裝的Tools和SDK,比如Android5.0.1(API 21)
4.3) 點擊安裝,開始下載


到此為止,NDK編譯以及Eclipse開發環境配置成功。

在Mac OS上配置Android開發環境

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.