Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/178.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 使用-make生成AOSP时出错_Android_Build_Android Source - Fatal编程技术网

Android 使用-make生成AOSP时出错

Android 使用-make生成AOSP时出错,android,build,android-source,Android,Build,Android Source,我正在尝试设置一个环境来构建android并在模拟器上运行它。我最近进入了AOSP,目前正在读一些关于它的书。我自己想把它弄得乱七八糟,我犯了以下错误: external/libcxx/include/cmath:1345:9: error: no member named 'llrint' in the global namespace; did you mean 'lrint'? external/libcxx/include/cmath:1348:91: error: use of und

我正在尝试设置一个环境来构建android并在模拟器上运行它。我最近进入了AOSP,目前正在读一些关于它的书。我自己想把它弄得乱七八糟,我犯了以下错误:

external/libcxx/include/cmath:1345:9: error: no member named 'llrint' in the global namespace; did you mean 'lrint'?
external/libcxx/include/cmath:1348:91: error: use of undeclared identifier 'llrintf'
external/libcxx/include/cmath:1349:91: error: use of undeclared identifier 'llrintl'
external/libcxx/include/cmath:1358:9: error: no member named 'llround' in the global namespace; did you mean 'lround'?

12 errors generated.
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libc++_static_intermediates/src/hash.o] Error 1
make: *** Waiting for unfinished jobs....
12 errors generated.
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libc++_static_intermediates/src/debug.o] Error 1
12 errors generated.
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libc++_static_intermediates/src/random.o] Error 1
12 errors generated.
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libc++_static_intermediates/src/algorithm.o] Error 1
总共有12个错误,中间有文本,但我没有全部复制,因为它们完全相同。(它们都是:error no member name“{double L}[SOMETHING]”您的意思是:{single L}[SOMETHING])

这是运行以下命令的结果:1:sourcebuild/envsetup.sh2:sunch 3:sudomake-j4

我正在使用El Capitan,并且已经跟随。我遇到的唯一问题是XCode没有创建一个包含正确SDK的/developer/SDKs文件夹,所以我从Github手动下载了SDK,并将其放在de-SDKs文件夹中(这是我创建的)。这可能就是问题所在吗

我试图构建的代码是未经修改的android 6.0.1r1。我尝试再次运行repoinit和reposync(可能是为了修复代码),但没有效果


我意识到这是一个相当长的问题,但我不知道如何解决这个问题。提前感谢。

您可以尝试使用MacOSX10.11.sdk作为您的MacOSX sdk

您可以从GitHub下载MacOSX10.11.sdk:

将MacOSX10.11.sdk复制到特定路径(例如~/lib),并创建到/Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs的软链接

$ln-s~/lib/MacOSX10.11.sdk/Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk

(我还将MacOSX10.11.sdk复制到/Developer/SDKs/)

并修改文件intandroid源代码:build/core/combo/mac_version.mk

mac_sdk_支持的版本:=10.9 10.10 10.11

完成了! 再次尝试编译源代码


操作系统:macOS Sierra 10.12

Android源代码:android6.0.1r1c

XCode:版本8.2.1

JDK:java版本“1.8.0_101”