1、执行完命令repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-7.1.2_r8
报错
warning: gpg (GnuPG) is not available.
warning: Installing it is strongly encouraged.
解决方案
执行命令 brew install gnupg 安装GnuPG
2、下载报错
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 60] Operation timed out
解决方案(原因:repo的运行过程中会尝试访问官方的git源更新自己,如果想使用tuna的镜像源进行更新,可以将如下内容复制到你的~/.bashrc
里)
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'
3、下载报错
GitError: --force-sync not enabled; cannot overwrite a local work tree
解放方案
开启强制更新即可 repo sync --force-sync
4、编译报错
nothing matches overlay file suw_navbar_ic_back.xml, for flavor anydpi-v21
解决方案(依赖没加)
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \
libgl1-mesa-dev libxml2-utils xsltproc unzip
5、编译报错
error: error opening 'out/host/darwin-x86/obj/SHARED_LIBRARIES/libart_intermediates/gc/heap.d': No space left on device
fatal error: error in backend: IO failure on output stream.
ninja: build stopped: subcommand failed.
make: *** [ninja_wrapper] Error 1
解决方案(分区磁盘小了)
修改磁盘大小 $ sudo hdiutil resize-size<new-size-you-want>g ~/android.dmg.sparseimage
6、编译报错
FAILED: /bin/bash out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex.rsp
Out of memory error (version 1.2-rc4 'Carnac' (298900 f95d7bdecfceb327f9d201a1348397ed8a843843 by [email protected])).
GC overhead limit exceeded.
Try increasing heap size with java option '-Xmx
解决方案
java -Xmx3000M -Xms1500M -XshowSettings:all
7、编译报错
In file included from out/target/product/generic/obj/STATIC_LIBRARIES/libext4_intermediates/libipt_ECN.c:11:0:external/iptables/extensions/../include/linux/netfilter_ipv4/ipt_ECN.h:13:37:
fatal error: linux/netfilter/xt_DSCP.h: No such file or directory #include
compilation terminated.make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libext4_intermediates/libipt_ECN.o] Error 1make: *** Waiting for unfinished jobs....
解决方案
将/Volumes/android/external/iptables/include/linux/netfilter_ipv4/ipt_ECN.h中的
#include
改成
#include