歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> Ubuntu下載Android源碼

Ubuntu下載Android源碼

日期:2017/3/3 13:03:08   编辑:Linux技術
坑太多,兩天晚上加一個星期日
首先,安裝Git工具:sudo apt-get install git-core gnupg
安JDK不說了
依賴包也不會出問題
然後下載repo(這是一個坑)
正常是這樣的 wgethttps://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 出現以下錯誤提示:
../bin/repo: 行 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,搞定!
Copyright © Linux教程網 All Rights Reserved