1

我尝试编译 AOSP android 12 beta 分支但没有成功。

我使用以下方法克隆了存储库:

repo init -u https://android.googlesource.com/platform/manifest -b refs/tags/android-s-beta-3
repo sync

然后使用:

source build/envsetup.sh
lunch aosp_blueline-userdebug
m

现在,当它开始运行时,过了一会儿,它失败了,因为存根库中有重复:

[ 95% 86/90] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
cd "$(dirname "out/soong/.bootstrap/bin/soong_build")" && BUILDER="$PWD/$(basename "out/soong/.bootstrap/bin/soong_build")" && cd / && env -i "$BUILDER"     --top "$TOP"     --out "out/soong"     -n "out"     -d "out/soong/build.ninja.d"     -t -l out/.module_paths/Android.bp.list -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used Android.bp
error: build/soong/java/core-libraries/Android.bp:130:1: module "legacy.core.platform.api.stubs" already defined
       libcore/mmodules/core_platform_api/Android.bp:182:1 <-- previous definition here
error: build/soong/java/core-libraries/Android.bp:146:1: module "stable.core.platform.api.stubs" already defined
       libcore/mmodules/core_platform_api/Android.bp:198:1 <-- previous definition here
error: build/soong/java/core-libraries/Android.bp:164:1: module "legacy-core-platform-api-stubs-system-modules" already defined
       libcore/mmodules/core_platform_api/Android.bp:216:1 <-- previous definition here
error: build/soong/java/core-libraries/Android.bp:180:1: module "stable-core-platform-api-stubs-system-modules" already defined
       libcore/mmodules/core_platform_api/Android.bp:232:1 <-- previous definition here
error: libcore/JavaLibrary.bp:994:1: module "core.current.stubs" already defined
       build/soong/java/core-libraries/Android.bp:27:1 <-- previous definition here
error: libcore/JavaLibrary.bp:1015:1: module "core-current-stubs-for-system-modules" already defined
       build/soong/java/core-libraries/Android.bp:48:1 <-- previous definition here
error: libcore/JavaLibrary.bp:1041:1: module "core-current-stubs-system-modules" already defined
       build/soong/java/core-libraries/Android.bp:74:1 <-- previous definition here

我还尝试将 build/soong 分支更改为 master 并且我有另一个构建失败。

如何编译这些 beta 版本?我错过了什么?

此外,我尝试过的所有 Android 12 测试版都已损坏。 例如,另一个 beta 1 问题

谢谢!

4

2 回答 2

1

好的,所以我终于编译了这个 beta 版本。我发现 beta 分支/标签不一定是编译的。

所以我所做的是看: https ://android.googlesource.com/platform/

当我遇到错误时,我试图检查这个有问题的子模块的稍后提交,该子模块修复了这个编译。这样做直到找到一起编译的提交的组合才神奇。

如果有人想知道我为了编译 Android 12 beta 2 而签出的具体提交,请告诉我

于 2021-08-01T11:11:21.957 回答
0

实际问题是此 AOSP 12 Beta 3 未完全同步,并且由于您遇到这些错误,因此在 different-2 文件中提及的模块很少。我也遇到了同样的错误。 在此处输入图像描述

通过在这些文件中注释这些模块来消除这些错误。

错误:build/soong/java/core-libraries/Android.bp:130:1: 模块“ legacy.core.platform.api.stubs ”已经定义

libcore/mmodules/core_platform_api/Android.bp:182:1 <-- 之前的定义

build/soong/java/core-libraries/Android.bp 第 130 行你可以评论这个模块。/*java_library { 名称:“ legacy.core.platform.api.stubs ”,可见性:core_platform_visibility,hostdex:true,compile_dex:true,

sdk_version: "none",
system_modules: "none",
static_libs: [
    "art.module.public.api.stubs.module_lib",
    "conscrypt.module.platform.api.stubs",
    "legacy.i18n.module.platform.api.stubs",
],
patch_module: "java.base",

}*/ 同样,你也必须与其他模块有关。

https://stackoverflow.com/users/4618429/omribager如果是,您是否成功构建了 AOSP 12 Beta 3,请提及该过程,因为在这些修复之后,我也遇到了其他模块问题。

[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja FAILED: out/soong/build.ninja cd "$(dirname "out/soong/.bootstrap/bin/soong_build" )" && BUILDER="$PWD/$(basename "out/soong/.bootstrap/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --out "out/ soong" -n "out" -d "out/soong/build.ninja.d" -t -l out/.module_paths/Android.bp.list -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used Android.bp 错误:external/rust/crates/zip/Android.bp:21: 1:“libzip”依赖于未定义的模块“libflate2” 01:00:29 很快引导失败:退出状态 1

未能建立一些目标 (01:08 (mm:ss))

于 2021-08-03T19:43:05.113 回答