文章标题

来源:互联网 发布:顺丰机打运单软件 编辑:程序博客网 时间:2024/05/18 03:51

Android开发环境搭建

  1. 下载repo工具
mkdir ~/binPATH=~/bin:$PATHcurl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo## 如果上述 URL 不可访问,可以用下面的:## curl https://storage-googleapis.proxy.ustclug.org/git-repo-downloads/repo > ~/bin/repochmod a+x ~/bin/repo
  1. 然后建立一个工作目录(名字任意)
mkdir WORKING_DIRECTORYcd WORKING_DIRECTORY
  1. 初始化代码仓库
repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest## 如果提示无法连接到 gerrit.googlesource.com,可以编辑 ~/bin/repo,把 REPO_URL 一行替换成下面的:## REPO_URL = 'https://gerrit-googlesource.proxy.ustclug.org/git-repo'
  1. 选择特定版本初始化
这里写代码片repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b android-4.0.1_r1//android-2.3.1_r1repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b android-2.3.1_r1
  1.  同步源代码
repo sync

install git

这里写代码片sudo apt-get install git

参考文章:
知呼:如何在中国下载Android源码:
https://www.zhihu.com/question/20738613
AOSP科大
https://lug.ustc.edu.cn/wiki/mirrors/help/aosp

0 0
原创粉丝点击