1.下载Cygwin,这里可以下载
https://cygwin.com/install.html
2. 安装Cygwin
如果第一次安装,你需要选install from internet
然后就是选安装位置,还有临时文件的位置和连接网络的设置,这些都默认就可以.
关键的一步是选择要安装的库和程序,以下这几个是要安装的:
Net -> curl
Devel -> git,git-completion,git-gui,gitk
Libs -> libreadline6,libiconv2
Editors -> vim
Python -> python
cygwin里面安装python
https://stackoverflow.com/questions/9850022/cygwin-python-2-7-package
3.安装repo
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
4.查看和修改环境变量
有时候会出现提示python错误,需要移除pathon相关的环境变量(/cygdrive/c/Python27)
查看PATH:echo $PATH
设置PATH: export PATH=/usr/local/bin:/usr/bin
5.下载android源代码
https://source.android.com/source/downloading#getting-the-files
repo init -u https://android.googlesource.com/platform/manifest
repo init -u https://android.googlesource.com/platform/manifest -b android-8.1.0_r9
网友评论