坑太多,两天晚上加一个星期日
首先,安装Git工具:sudo apt-get install git-core gnupg
安JDK不说了
依赖包也不会出问题
然后下载repo(这是一个坑)
正常是这样的 wget https://dl-ssl.google.com/dl/googlesource/git-repo/repo
chmod a+x repo
但是此时repo init -u https://android.googlesource.com/a/platform/manifest -b android-4.3_r2.1 出现以下错误提示:
newline' 附近有语法错误../bin/repo: 行 1:
quot;-//IETF//DTD HTML 2.0//EN">'
改用curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ~/bin/repo
然后repo init -u https://android.googlesource.com/a/platform/manifest -b android-4.3_r2.1
此时如果还有问题将https改为http或者在.repo目录下的manifest.xml里找到fetch属性
改成
fetch="git://Android.git.linaro.org/"
最后repo sync ,OK,搞定!