1.安装 ubuntu 14.03

尽管android推荐 ubuntu 15, 安全起见,还是装LTS的14.04,步骤跳过

2. JDK:

Marshmallow 需要 JDK8 ,添个源,顺手配下java

sudo add-apt-repository ppa:openjdk-r/ppasudo apt-get update sudo update-alternatives --config java
sudo update-alternatives --config javac

3.装下依赖项

sudo apt-get install git-core gnupg flex bison gperf build-essential \  zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \  lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \  libgl1-mesa-dev libxml2-utils xsltproc unzip

4. adb USB

 wget -S -O - http://source.android.com/source/51-android.rules | sed "s/<username>/$USER/" | sudo tee >/dev/null /etc/udev/rules.d/51-android.rules; sudo udevadm control --reload-rules

5.设置编译输出目录

export OUT_DIR_COMMON_BASE=<path-to-your-out-directory>

6.装个REPO工具$ mkdir ~/bin

 
墙外
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
墙内

cd ~
git clone git://aosp.tuna.tsinghua.edu.cn/android/git-repo.git

PATH=~/git-repo:$PATH
    

7.建个工作目录

mkdir ~/marshmallow
cd ~/marshmallow
墙内


指定Head版本
repo init -u git://aosp.tuna.tsinghua.edu.cn/aosp/platform/manifest
指定分支
repo init -u git://aosp.tuna.tsinghua.edu.cn/aosp/platform/manifest -b android-6.0.1_r16
墙外
repo init -u https://android.googlesource.com/platform/manifest
或者
   
repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r16
同步代码
$ repo sync


8.

更多相关文章

  1. 【Android笔记】Android统计文件夹大小,删除文件夹下的所有文件方
  2. Android(安卓)AIDL基本步骤
  3. android 加载动态库
  4. android 学习之安装
  5. Qt5.1.1 for android 环境配置
  6. Android番外03_Umeng友盟统计集成
  7. Android模仿文件夹管理实例
  8. 64位win7操作系统 Android(安卓)开发环境配置图文教程(jdk+eclip
  9. Eclipse+android 开发配置步骤

随机推荐

  1. 修改android默认时区语言
  2. 新建ArcGIS Project for Android项目失败
  3. android工程下轻松运行java main程序
  4. Android学习笔记(九)之Android 获取正在
  5. android toast 和checkbox and radiogrou
  6. android tool export报错为support v7包
  7. (转)Android(安卓)N 开发者预览版 2 发布
  8. Android(安卓)CollapsingToolbarLayout
  9. Handler,Looper,MessageQueue的实现
  10. Listview Section 多个标题以及内容