代码之家  ›  专栏  ›  技术社区  ›  OmB

AOSP Android 12 Beta版本构建失败

  •  1
  • OmB  · 技术社区  · 3 年前

    我试图编译AOSP安卓12测试版分支,但没有成功。

    我使用以下方法克隆了回购:

    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,我有另一个build-faliure。

    我该如何编译这些测试版?我错过了什么??

    此外,我尝试过的所有安卓12测试版都坏了。 For example, another beta 1 question

    谢谢

    0 回复  |  直到 3 年前
        1
  •  1
  •   OmB    3 年前

    好的,最后我已经编译了这个测试版。 我发现beta分支/标签不一定是编译的。

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

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

    如果有人想知道我为了编译安卓12测试版2而签出了哪个特定的承诺,请告诉我

        2
  •  0
  •   Varun RTR    3 年前

    实际问题是,这个AOSP 12 Beta 3没有完全同步,并且由于您收到这些错误,在不同的-2文件中很少提到模块。我也犯了同样的错误。 enter image description here

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

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

    libcore/mmodule/core_platform_api/Android.bp:182:1<--此处的先前定义

    build/soong/java/core-librarys/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 失败: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/soung/build.inja.d”-t-l out/.module_paths/Android.bp.list-globFile out/soong/.build-globs.ninja-o out/sooing/build.ninja-available_env out/soog/soong.environment.available--used_env out/souing/soong.environment.used Android.bp 错误:external/rust/crates/zip/Android.bp:21:1:“libzip”依赖于未定义的模块“libflate2” 01:00:29 soong引导失败,返回:退出状态1

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

    推荐文章