MAC 下编译 ANDROID P 源码 提示 internal error: Could not find a supported mac sdk: ["10.10" "10.11" "10.12...

本文解决在MAC环境下编译ANDROIDP源码遇到的内部错误问题,通过添加10.14到darwinSupportedSdkVersions列表,解决了因SDK版本不支持导致的编译失败。

MAC 下编译 ANDROID P 源码出现下面的问题:

ninja: no work to do.
[21/21] 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 -o out/soong/build.ninja Android.bp
internal error: Could not find a supported mac sdk: ["10.10" "10.11" "10.12" "10.13"]
ninja: build stopped: subcommand failed.
15:14:37 soong bootstrap failed with: exit status 1

#### failed to build some targets (13 seconds) ####

  

解决方案:

cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
ls

发现 SDK 为10.14,在 源码跟目录下查看 darwinSupportedSdkVersions 的定义,发现没有10.14,添加10.14即可 

vim build/soong/cc/config/x86_darwin_host.go
 80         darwinSupportedSdkVersions = []string{
 81                 "10.10",
 82                 "10.11",
 83                 "10.12",
 84                 "10.13",
 85                 "10.14",
 86         }

然后再编译就好。

如果在/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/中没有SDK,可以在 https://github.com/phracker/MacOSX-SDKs/releases 下载 

解压后copy 到 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/

转载于:https://www.cnblogs.com/larack/p/9646860.html

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值