8

I see the error when I try to build 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) ####

my system version :

macOS High Sierra v10.13.4

my Xcode version:

Version 9.3 (9E145)

Can anyone help me ?

I have tried this , but it's not working for me.

haizhih
  • 97
  • 1
  • 8

3 Answers3

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

please edit this file to include your version of SDK

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

or your version of mac sdk

krishna chetan
  • 659
  • 1
  • 10
  • 20
6

Expanding slightly on Krishna Chetan's answer:

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

This worked for me on:

  • Mac High Sierra Version 10.13.6 (17G3025)
  • XCode Version 10.1 (10B61)
Micha Pringle
  • 123
  • 2
  • 8
1

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

enter image description here

Hitesh Sahu
  • 41,955
  • 17
  • 205
  • 154