mac 10.10 编译 android aosp

基本按照官网指示做就可以了。

Mac OS (Intel/x86)
  • Android 6.0 (Marshmallow) - AOSP master: Mac OS v10.10 (Yosemite) or later with Xcode 4.5.2 and Command Line Tools
  • Android 5.x (Lollipop): Mac OS v10.8 (Mountain Lion) with Xcode 4.5.2 and Command Line Tools
  • Android 4.1.x-4.3.x (Jelly Bean) - Android 4.4.x (KitKat): Mac OS v10.6 (Snow Leopard) or Mac OS X v10.7 (Lion) and Xcode 4.2 (Apple's Developer Tools)
  • Android 1.5 (Cupcake) - Android 4.0.x (Ice Cream Sandwich): Mac OS v10.5 (Leopard) or Mac OS X v10.6 (Snow Leopard) and the Mac OS X v10.5 SDK

这里要留意的是 xcode的版本, 要对应上,太高版本可是有麻烦的。
本人编译 5.1.1, 使用 xcode 5.1 通过, 使用xcode 7.x 就不行。
下载xcode dmg
Save the actual path
$ xcode-select -p 

# Set new path 
$ sudo xcode-select -s /Volumes/Xcode/Xcode.app/Contents/Developer 

mac 的文件系统默认是存储大写,但大小写不敏感的。
android 编译需要 敏感的系统,于是要创建一个

hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 200g ~/android.dmg

(hdiutil resize -size <new-size-you-want>g ~/android.dmg.sparseimage)


然后mount上去
加在 ~/.bash_profile

ulimit -S -n 1024

function mountAndroid { hdiutil attach ~/android.dmg -mountpoint /Volumes/android; }

function umountAndroid() { hdiutil detach /Volumes/android; }

安装 MacPorts
xcode-select -install
xcodebuild -license
下载 pkg 执行安装

POSIXLY_CORRECT=1 sudo port install gmake libsdl git gnupg


To install Repo:

  1. Make sure you have a bin/ directory in your home directory and that it is included in your path:

    $ mkdir ~/bin
    $ PATH=~/
    bin:$PATH
  2. Download the Repo tool and ensure that it is executable:

    $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    $ chmod a
    +x ~/bin/repo
    repo init -u https://android.googlesource.com/platform/manifest -b android-5.1.1_r30
    repo sync


make clobber

source build/envsetup.sh

lunch aosp_arm-eng

make -j4

android studio 查看代码
mmm development/tools/idegen/
./development/tools/idegen/idegen.sh











评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值