5

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?

darklord
  • 5,077
  • 12
  • 40
  • 65

4 Answers4

7

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.

Harvey
  • 101
  • 1
  • 4
5

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 .

aheadlcx
  • 63
  • 5
3

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.

Community
  • 1
  • 1
scorpiodawg
  • 5,612
  • 3
  • 42
  • 62
  • I've done the same thing (On El Capitan) and it worked for me using Xcode 6.3.2. – Bobbake4 Oct 12 '16 at 23:03
  • 1
    This does work on Sierra. However it messes up with other things. We have to switch back and forth from 5.1.1 SDK to the latest one, e.g. for homebrew. – Paschalis Nov 29 '16 at 23:43
  • Harveys answer now solve this issue! No more back-n-forth between XCode versions! – Paschalis Feb 22 '17 at 00:28
3

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.
Uki D. Lucas
  • 516
  • 6
  • 4