2016-03-22 36 views
0

我正在尝试在OSX El Capitan上使用MacOS SDK版本10.11构建AOSP的Lollipop-cts-dev分支。我面临着不同设置的不同构建问题。目前,我得到以下错误:Android的源代码可以在El Capitan和XCode 7.2上构建吗?

system/core/include/log/log.h:35:20: error: stdarg.h: No such file or directory 
make: *** [out/host/darwin-x86/obj32/STATIC_LIBRARIES/libinput_intermediates/Keyboard.o] Error 1 
make: *** Waiting for unfinished jobs.... 
make: *** [out/host/darwin-x86/obj32/STATIC_LIBRARIES/libinput_intermediates/InputDevice.o] Error 1 
make: *** [out/host/darwin-x86/obj32/STATIC_LIBRARIES/libinput_intermediates/Input.o] Error 1 
Note: Some input files use unchecked or unsafe operations. 
Note: Recompile with -Xlint:unchecked for details. 

#### make failed to build some targets (03:58 (mm:ss)) #### 

我的猜测是,这是因为对于AOSP代码库OSX SDK的版本不兼容。更具体地说,如要求中提到的 https://source.android.com/source/requirements.html Android 5.x(Lollipop)需要Mac OS v10.8(Mountain Lion)。

有人可以证实这一点吗?有没有简单的方法来建立El Capitan的棒棒糖?

回答

0

我不知道这是否会有所帮助,但你可能在build/core/combo/HOST_darwin-x86.mk找到下面的代码:

ifeq ($(mac_sdk_version),10.8) 
host_toolchain_header := $(HOST_TOOLCHAIN_ROOT)/lib/gcc/i686-apple-darwin$(gcc_darwin_version)/4.2.1/include 
HOST_GLOBAL_CFLAGS += -isystem $(host_toolchain_header) 
endif 
else 

修改10.810.11可以解决这个问题。

解决方案资源(以简体中国):

http://www.liball.me/mac-10-10-build-android-4-4-4-for-nexus/