參考http://source.android.com/source/downloading.html網站 html
若是發現下載的時候timeout,能夠把repo init -u https://android.googlesource.com/platform/manifest改成repo init -u https://android.googlesource.com/a/platform/manifest
並去https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=413937457453.apps.googleusercontent.com&scope=https://www.googleapis.com/auth/gerritcodereview&redirect_uri=https://www.googlesource.com/new-passwouird&state=android開放本身git權限 java
編譯的時候,若是出現java方面的奇怪問題,能夠考慮是否是內存和swap空間過小的緣由。能夠擴大swap空間。 linux
遇到問題: android
host SharedLib: libOpenglRender (out/host/linux-x86/obj/lib/libOpenglRender.so)
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libX11.so when searching for -lX11
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libX11.a when searching for -lX11
/usr/bin/ld: skipping incompatible /usr/lib/libX11.so when searching for -lX11
/usr/bin/ld: skipping incompatible /usr/lib/libX11.a when searching for -lX11
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
git
解決方法: api
首先檢查是否安裝 -lX11(libx11-dev) sudo apt-get install libx11-dev app
若是已安裝,但依舊有錯誤,能夠: 網站
sudo ln -s /usr/lib32/libX11.so.6 /usr/lib32/libX11.so ui