Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find a supported mac sdk: ["10.10" "10.11" "10.12" "10.13"]

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.

like image 608
haizhih Avatar asked Jun 08 '18 12:06

haizhih


3 Answers

/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

like image 128
krishna chetan Avatar answered Sep 19 '22 17:09

krishna chetan


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)
like image 34
Micha Pringle Avatar answered Sep 21 '22 17:09

Micha Pringle


  • Download any of the 10.10, 10.11, 10.12, 10.13 freaky Mac SDK sdk 10,1 from https://github.com/phracker/MacOSX-SDKs

    or https://github.com/phracker/MacOSX-SDKs/releases

  • Copy and paste downloaded sdk in Finder--> Go To Folder-->

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

enter image description here

like image 32
Hitesh Sahu Avatar answered Sep 21 '22 17:09

Hitesh Sahu