找不到支持的mac sdk:[" 10.10" " 10.11" " 10.12" " 10.13"]

时间:2018-06-08 12:29:43

标签: makefile android-source

当我尝试构建Android Open Project Source时,我看到了错误。

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)

任何人都可以帮助我吗?

我尝试了this,但它并不适合我。

3 个答案:

答案 0 :(得分:5)

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

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

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

或您的mac sdk版本

答案 1 :(得分:2)

略论克里希纳·切坦的答案:

# 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)

答案 2 :(得分:0)

  

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

enter image description here