无法找到支持的Mac SDK:["10.10" "10.11" "10.12" "10.13"]。

8

我尝试构建Android开源项目源代码时,遇到了错误。

ninja: no work to do.
[1/1] 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.
20:17:47 soong bootstrap failed with: exit status 1

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

我系统的版本是:

macOS High Sierra v10.13.4

我的Xcode版本是:

Version 9.3 (9E145)

有谁可以帮助我吗?

我已经尝试了这个方法,但对我不起作用。

3个回答

8
/Volumes/android/build/soong/cc/config/x86_darwin_host.go 

请编辑此文件以包含您的 SDK 版本。

darwinSupportedSdkVersions = []string{
        "10.10",
        "10.11",
        "10.12",
        "10.13",

或者您的Mac SDK版本

6
稍微扩展一下Krishna Chetan的回答:
# What mac sdk do you have installed?
find /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs -iname "*.sdk"

# edit the configuration file
subl /<your Android build dir>/build/soong/cc/config/x86_darwin_host.go

# add your version to the listed versions in the file
darwinSupportedSdkVersions = []string{
        "10.10",
        "10.11",
        "10.12",
        "10.14", <--- add your version that you turned up in the find command here
    }

这对我有效的操作系统版本和工具如下:

  • Mac High Sierra 版本 10.13.6 (17G3025)
  • XCode 版本 10.1 (10B61)

1

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接