Build aosp on mac 10.12

房东的猫 提交于 2019-12-04 13:04:43

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.

scorpiodawg

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.

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 .

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.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!