3
votes

I used to build aosp on my mac. Recently I upgraded the mac os Mac Sierra (10.12). The I received this error message while building the project:

Could not find a supported mac sdk: ["10.8" "10.9" "10.10" "10.11"]

The mac sdk version has been upgraded to 10.12 however it is not within the supported mac sdk list. What could be a solution to this problem?

4

4 Answers

7
votes

I have solved this problem on macOS Sierra (10.12.2) with Xcode 8.2. The solution may be helpful:

  1. Download MacOSX10.11.sdk on phracker/MacOSX-SDKs
  2. Unzip to folder: /Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/

If you upgrade Xcode, the folder will be removed. So You will repeat the above action, or place it in your own directory then make a link.

4
votes

man,here is a good news .I find the error message source and find the method to solve it.Edit the file which location is android/build/soong/cc/config/x86_darwin_host.go .

darwinSupportedSdkVersions = []string{
    "10.8",
    "10.9",
    "10.10",
    "10.11",
    "10.12"
}

change it .

3
votes

I've never tried this on Sierra, but did run into the same issue on OS X El Capitan. Here's a link to my solution: Running AOSP build on Mac (Yosemite and later) (worked for me). Gist of this is to get an older version of the XCode DMG, and dynamically mount it prior to building AOSP.

Here are a couple of threads talking about this same issue:

Good luck.

2
votes

To build Android on MacBookPro High Sierra, I had to overcome few obstacles.

I looked up the MacOS SDK version, I am currently running:

$ ls /Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
MacOSX.sdk  MacOSX10.13.sdk

Then changed build/soong/cc/config/x86_darwin_host.go to:

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

I also had to get a case-sensitive file system USB-C SSD disk.

build/core/main.mk:105: warning: 
Please move your source tree to a case-sensitive filesystem.