Mac11.5 编译Android源代码报错汇集

    fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
    fatal: error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)
    fatal: cloning the git-repo repository failed, will remove '.repo/repo'

    解决方法:
    在 import sys下面添加

    import ssl
    ssl._create_default_https_context = ssl._create_unverified_context
    repo: command not found
    

    解决方法:

    echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
    export PATH=$PATH:$HOME/bin
    

    repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest
    Downloading Repo source from https://gerrit-google.tuna.tsinghua.edu.cn/git-repo
    fatal: Cannot get https://gerrit-google.tuna.tsinghua.edu.cn/git-repo/clone.bundle
    fatal: error [Errno 0] Error
    fatal: cloning the git-repo repository failed, will remove '.repo/repo'

    repo的运行过程中会尝试访问官方的git源更新自己,如果想使用tuna的镜像源进行更新,可以将如下内容>复制到你的~/.bashrc里

    export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'
    

    并重启终端模拟器。

    error: Unable to fully sync the tree.
    error: Downloading network changes failed.
    Try re-running with "-j1 --fail-fast" to exit at the first error.
    carlos@carlos-virtual-machine:~/Android/source$ repo sync -j1 --fail-fast

    部分代码同步失败
    解决方法:

    repo sync -j1 --fail-fast
    [100% 135/135] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
    FAILED: out/soong/build.ninja
    out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Android.bp
    internal error: Could not find a supported mac sdk: ["10.10" "10.11" "10.12" "10.13" "10.14"]
    internal error: Could not find a supported mac sdk: ["10.10" "10.11" "10.12" "10.13" "10.14"]
    17:15:02 soong bootstrap failed with: exit status 1

    failed to build some targets (25 seconds)

    解决方案:
    下载Maxsdks 10.14下载地址复制到/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/目录下,并修改/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist文件中的(此文件需要使用Xcode打开)
    MinimumSDKVersion 为10.14