android - AOSP build base_rules.mk already defined 报错

标签 android android-source

我试图在 OS X 10.12.5 中构建 android 源代码,但出现错误。现在我需要你的帮助来构建 android 源代码。我的 java 版本是“java 版本“1.8.0_31””。 当我运行时让它有一些错误

 [38/38] bootstrap out/soong/.minibootstrap/build.ninja.in
 [1/2] out/soong/.bootstrap/bin/minibp out/soong/.minibootstrap/build.ninja.in
 [4/4] out/soong/.bootstrap/bin/minibp out/soong/.bootstrap/build.ninja
 [496/497] glob test/vts/utils/native/trace_processor/Android.bp
 [46/46] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
 out/build-aosp_arm.ninja is missing, regenerating...
 Checking build tools versions...
 [2/691] including ./art/Android.mk ...
 art/build/Android.common.mk:50: warning: unsupported HOST_ARCH=x86_64
 [9/691] including ./cts/Android.mk ...
 cts/tests/tests/telecom3/Android.mk:37: warning: FindEmulator: find: `cts/tests/tests/telecom/src/android/telecom/cts/MockDialerActivity.java': No such file or directory
 [187/691] including ./external/googletest/Android.mk ...
 build/core/base_rules.mk:238: error: external/googletest/googletest: MODULE.TARGET.STATIC_LIBRARIES.libgtest already defined by external/googletest/googletest.
 16:57:43 ckati failed with: exit status 1
 make: *** [run_soong_ui] Error 1

 #### make failed to build some targets (01:23 (mm:ss)) ####

最佳答案

这对我有用:

unset NDK_ROOT

我发现它在:

3, build/core/base_rules.mk:238: error: external/googletest/googletest: MODULE.TARGET.STATIC_LIBRARIES.libgtest already defined by external/googletest/googletest. 16:57:43 ckati failed with: exit status 1 is compiling In the process encountered this problem many times, the problem is that something is redefined, and later multiple search, the original is that I set the NDK_ROOT and SDK_ROOT in the mac environment variable, which is the path of the NDK and SDK, and then compiled later Android source code will conflict with them, so temporarily cancel the set of NDK and SDK environment variables, you can solve this problem.

translated by 'google translate' from here

关于android - AOSP build base_rules.mk already defined 报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43975551/

相关文章:

android - 如何将对象返回到表面 View android

android - 在Android内核中加载内核模块

android - 阻止 Android 中的特定应用程序(通过修改源代码)

带有 git 子模块的 Android Maven IntelliJ 项目

android - 是否可以将隐藏的小部件导出为图像?

android - 如何轻松找到android类的源

Android 应用程序到 Linux 的流程映射

android - 未能构建 aosp。说子命令失败

java - 从 Java 重新训练 Tensorflow inception v3 网络

android - 为 android 编写实时 opengl-es 游戏 - 一些问题(优化)