我正在尝试在OS X 10.12.5中构建android源代码,但是我收到了一个错误。现在我希望你的帮助来构建android源代码。我的java版本是'java version“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)) ####
答案 0 :(得分:3)
这对我有用:
for /R "D:\Workspaces\fwarrener-lglesias\Example\Example\Clients" %%x in ("EnterpriseSettings?.config") do (
if /I "%%~nxx"=="EnterpriseSettings.config" (
echo %%~nxx
echo %%~dpx
)
)
我发现了:
3,build / core / base_rules.mk:238:错误:external / googletest / googletest:MODULE.TARGET.STATIC_LIBRARIES.libgtest已由external / googletest / googletest定义。 16:57:43 ckati失败了:退出状态1正在编译在这个过程中多次遇到这个问题,问题是有些东西被重新定义,后来多次搜索,原来就是我在mac环境中设置了NDK_ROOT和SDK_ROOT变量,这是NDK和SDK的路径,然后编译以后Android源代码会与它们发生冲突,所以暂时取消NDK和SDK环境变量集,就可以解决这个问题。