Mac OS X下安装配置Android源码开发环境

2016-09-20  本文已影响0人  feifei_fly

1、由于Mac OS X是大小写不敏感的文件系统,所以需要创建一个大小写敏感的disk image。方法如下:

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

这里生成的是android.dmg.sparseimage文件。

在Mac 桌面 产生该镜像的文件夹,双击将其改名为Android.dmg。

2、挂在disk Image:

(1)执行以下命令 将~/android.dmg.sparseimage 挂在到mac的磁盘上.

#hdiutil attach ~/android.dmg.sparseimage -mountpoint /Volumes/android

 (2) 将以上命令 编辑~/.bash_profile,使系统每次开机自动挂在android.dmg.sparseimage。

# mount the android file image

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

三、下载repo

$ mkdir~/bin

$ PATH=~/bin:$PATH

$ curl https://storage.googleapis.com/git-repo-downloads/repo> ~/bin/repo

$ chmod a+x~/bin/repo

四、利用repo下载android源码:

(1)初始化repo客户端:

$ cd /Volumes/Android.dmg/

$ mkdir WORKING_DIRECTORY

$ cd WORKING_DIRECTORY

 (2) 查看android 源码分支列表:

$ repo init-u https://android.googlesource.com/platform/manifest

五、参考链接:

andro源码官网:http://source.android.com/source/initializing.html

参考链接1:http://blog.csdn.net/forlong401/article/details/8517933

http://www.tuicool.com/articles/iaEjeaY

上一篇 下一篇

猜你喜欢

热点阅读