为 Raspberry Pi 4 编译 Android 11 的问题 - 不久 bootstrap 失败:退出状态 1
Compile problem of Android 11 for Raspberry Pi 4 - soong bootstrap failed with: exit status 1
我一直在按照说明 (https://github.com/android-rpi/device_arpi_rpi4/blob/arpi-11/README) 为 Raspberry Pi 4 构建 Android 11,并且 运行 遇到了 make 执行的问题。对于我的世界,我无法弄清楚我错过了什么或做错了什么。我试图解决的实际错误是什么?我的假设是缺少依赖项。
>============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=11 TARGET_PRODUCT=rpi4
> TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_ARCH=arm64
> TARGET_ARCH_VARIANT=armv8-a TARGET_CPU_VARIANT=cortex-a72
> HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux
> HOST_OS_EXTRA=Linux-5.4.0-47-generic-x86_64-Linux-Mint-20
> HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64
> HOST_BUILD_TYPE=release BUILD_ID=RP1A.200720.011 OUT_DIR=out
> PRODUCT_SOONG_NAMESPACES=external/mesa3d
> ============================================ [100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja FAILED:
> out/soong/build.ninja out/soong/.bootstrap/bin/soong_build -t -l
> out/.module_paths/Android.bp.list -b out/soong -n out -d
> out/soong/build.ninja.d -globFile out/soon
> g/.bootstrap/build-globs.ninja -o out/soong/build.ninja Android.bp
> error: tools/Android.bp:15:1: module "api-versions-jars-dir" already
> defined
> prebuilts/tools/Android.bp:15:1 <-- previous definition here error:
> tools/common/google-api-services-storage/1.24.1/Android.bp:17:1:
> module "prebuilt_google-api-services-storage" already defined
> prebuilts/tools/common/google-api-services-storage/1.24.1/Android.bp:17:1
> <-- previous definition here error:
> tools/common/google-api-java-client/1.23.0/Android.bp:17:1: module
> "prebuilt_google-api-java-client-min-repackaged" already defined
> prebuilts/tools/common/google-api-java-client/1.23.0/Android.bp:17:1
> <-- previous definition here error:
> tools/common/google-api-services-compute/Android.bp:17:1: module
> "prebuilt_google-api-services-compute" already defined
> prebuilts/tools/common/google-api-services-compute/Android.bp:17:1 <--
> previous definition here error:
> prebuilts/tools/common/netbeans-visual/Android.bp:15:1: module
> "prebuilt_org-netbeans-api-visual" already defined
> tools/common/netbeans-visual/Android.bp:15:1 <-- previous definition here error: tools/common/m2/Android.bp:15:1: module
> "prebuilt_byte-buddy-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:36:1 <-- previous definition here error: tools/linux-x86_64/perfetto/Android.bp:1:1:
> module "prebuilt_perfetto_trace_processor_shell_prebuilt" already
> defined
> prebuilts/tools/linux-x86_64/perfetto/Android.bp:1:1 <-- previous definition here error:
> prebuilts/tools/common/netbeans-visual/Android.bp:21:1: module
> "prebuilt_org-openide-util" already defined
> tools/common/netbeans-visual/Android.bp:21:1 <-- previous definition here error: tools/common/m2/Android.bp:21:1: module
> "prebuilt_diffutils-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:42:1 <-- previous definition here error: tools/linux-x86_64/perfetto/Android.bp:8:1:
> module "perfetto_artifacts" already defined
> prebuilts/tools/linux-x86_64/perfetto/Android.bp:8:1 <-- previous definition here error: tools/common/m2/Android.bp:38:1:
> module "prebuilt_gson-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:49:1 <-- previous definition here error: tools/common/m2/Android.bp:45:1: module
> "prebuilt_guava-listenablefuture-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:56:1 <-- previous definition here error: tools/common/m2/Android.bp:51:1: module
> "prebuilt_mockito2-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:62:1 <-- previous definition here error: tools/common/m2/Android.bp:57:1: module
> "prebuilt_objenesis-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:68:1 <-- previous definition here error: tools/common/m2/Android.bp:62:1: module
> "prebuilt_truth-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:79:1 <-- previous definition here error: tools/common/m2/Android.bp:70:1: module
> "prebuilt_javapoet-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:127:1 <-- previous definition here error: tools/common/m2/Android.bp:75:1: module
> "prebuilt_protobuf-java-util-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:137:1 <-- previous definition here error: tools/common/m2/Android.bp:86:1: module
> "prebuilt_trove-prebuilt" already defined
> prebuilts/tools/common/m2/Android.bp:142:1 <-- previous definition here error: tools/common/m2/Android.bp:91:1: module
> "prebuilt_jna-prebuilt" already defined
> prebuilts/tools/common/m2/Android.bp:147:1 <-- previous definition here error: tools/common/m2/Android.bp:96:1: module
> "prebuilt_compile-testing-prebuilt" already defined
> prebuilts/tools/common/m2/Android.bp:152:1 <-- previous definition here error: tools/common/m2/Android.bp:103:1: module
> "truth-prebuilt-host-jar" already defined
> prebuilts/tools/common/m2/Android.bp:159:1 <-- previous definition here error: tools/common/m2/Android.bp:110:1: module
> "mockito-robolectric-prebuilt" already defined
> prebuilts/tools/common/m2/Android.bp:166:1 <-- previous definition here error: tools/common/m2/Android.bp:120:1: module
> "truth-prebuilt" already defined
> prebuilts/tools/common/m2/Android.bp:176:1 <-- previous definition here error: tools/common/m2/Android.bp:132:1: module
> "truth-host-prebuilt" already defined
> prebuilts/tools/common/m2/Android.bp:188:1 <-- previous definition here error: tools/common/m2/Android.bp:137:1: module
> "prebuilt_metalava-tools-common-m2-deps" already defined
> prebuilts/tools/common/m2/Android.bp:202:1 <-- previous definition here error: tools/common/m2/Android.bp:149:1: module
> "prebuilt_dokka-tools-common-m2-deps" already defined
> prebuilts/tools/common/m2/Android.bp:214:1 <-- previous definition here error: tools/common/m2/Android.bp:169:1: module
> "prebuilt_accessibility-test-framework" already defined
> prebuilts/tools/common/m2/Android.bp:233:1 <-- previous definition here error: tools/common/m2/Android.bp:176:1: module
> "prebuilt_javawriter" already defined
> prebuilts/tools/common/m2/Android.bp:240:1 <-- previous definition here error: tools/common/m2/Android.bp:184:1: module
> "prebuilt_kotlinx-metadata-jvm" already defined
> prebuilts/tools/common/m2/Android.bp:282:1 <-- previous definition here error: tools/common/m2/Android.bp:190:1: module
> "prebuilt_auto-common" already defined
> prebuilts/tools/common/m2/Android.bp:288:1 <-- previous definition here error: tools/common/m2/Android.bp:196:1: module
> "prebuilt_antlr4" already defined
> prebuilts/tools/common/m2/Android.bp:294:1 <-- previous definition here error: tools/common/m2/Android.bp:202:1: module
> "prebuilt_auto-value-annotations" already defined
> prebuilts/tools/common/m2/Android.bp:300:1 <-- previous definition here error: tools/common/m2/Android.bp:213:1: module
> "prebuilt_commons-codec" already defined
> prebuilts/tools/common/m2/Android.bp:306:1 <-- previous definition here error: tools/common/m2/Android.bp:219:1: module
> "prebuilt_xerial-sqlite-jdbc" already defined
> prebuilts/tools/common/m2/Android.bp:312:1 <-- previous definition here error: tools/common/m2/Android.bp:225:1: module
> "prebuilt_jetbrains-annotations" already defined
> prebuilts/tools/common/m2/Android.bp:318:1 <-- previous definition here error: tools/common/m2/Android.bp:231:1: module
> "prebuilt_kotlinx-coroutines-core-nodeps" already defined
> prebuilts/tools/common/m2/Android.bp:324:1 <-- previous definition here error: tools/common/m2/Android.bp:237:1: module
> "kotlinx-coroutines-core" already defined
> prebuilts/tools/common/m2/Android.bp:329:1 <-- previous definition here error: tools/common/m2/Android.bp:246:1: module
> "prebuilt_kotlinx-coroutines-android-nodeps" already defined
> prebuilts/tools/common/m2/Android.bp:338:1 <-- previous definition here error: tools/common/m2/Android.bp:252:1: module
> "kotlinx-coroutines-android" already defined
> prebuilts/tools/common/m2/Android.bp:343:1 <-- previous definition here error: tools/common/m2/Android.bp:262:1: module
> "prebuilt_car-androidx-room-compiler-tools-common-m2-deps" already
> defined
> prebuilts/tools/common/m2/Android.bp:353:1 <-- previous definition here error: tools/common/m2/Android.bp:288:1: module
> "prebuilt_protobuf-lite" already defined
> prebuilts/tools/common/m2/Android.bp:374:1 <-- previous definition here error: tools/common/m2/Android.bp:293:1: module
> "prebuilt_jsoup-1.6.3" already defined
> prebuilts/tools/common/m2/Android.bp:379:1 <-- previous definition here error: tools/common/m2/robolectric.bp:1:1: module
> "prebuilt_robolectric-accessibility-test-framework-2.1" already
> defined
> prebuilts/tools/common/m2/robolectric.bp:1:1 <-- previous definition here error:
> tools/common/m2/repository/io/netty/netty-common/Android.bp:17:1:
> module "prebuilt_netty-common-java-4.1.3.Final" already defined
> prebuilts/tools/common/m2/repository/io/netty/netty-common/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/grpc/grpc-context/Android.bp:17:1:
> module "prebuilt_grpc-java-context-1.0.1" already defined
> prebuilts/tools/common/m2/repository/io/grpc/grpc-context/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/netty/netty-handler/Android.bp:17:1:
> module "prebuilt_netty-handler-java-4.1.3.Final" already defined
> prebuilts/tools/common/m2/repository/io/netty/netty-handler/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/netty/netty-codec/Android.bp:17:1:
> module "prebuilt_netty-codec-java-4.1.3.Final" already defined
> prebuilts/tools/common/m2/repository/io/netty/netty-codec/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/netty/netty-transport/Android.bp:17:1:
> module "prebuilt_netty-transport-java-4.1.3.Final" already defined
> prebuilts/tools/common/m2/repository/io/netty/netty-transport/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/net/sf/jopt-simple/jopt-simple/4.9/Android.bp:17:1:
> module "prebuilt_jopt-simple-4.9" already defined
> prebuilts/tools/common/m2/repository/net/sf/jopt-simple/jopt-simple/4.9/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/grpc/grpc-stub/Android.bp:17:1: module
> "prebuilt_grpc-java-stub-1.0.1" already defined
> prebuilts/tools/common/m2/repository/io/grpc/grpc-stub/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/grpc/grpc-protobuf/Android.bp:17:1:
> module "prebuilt_grpc-java-protobuf-1.0.1" already defined
> prebuilts/tools/common/m2/repository/io/grpc/grpc-protobuf/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/grpc/grpc-netty/Android.bp:17:1: module
> "prebuilt_grpc-java-netty-1.0.1" already defined
> prebuilts/tools/common/m2/repository/io/grpc/grpc-netty/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/grpc/grpc-core/Android.bp:17:1: module
> "prebuilt_grpc-java-core-1.0.1" already defined
> prebuilts/tools/common/m2/repository/io/grpc/grpc-core/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/netty/netty-codec-http2/Android.bp:17:1:
> module "prebuilt_netty-codec-http2-java-4.1.3.Final" already def ined
> prebuilts/tools/common/m2/repository/io/netty/netty-codec-http2/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/netty/netty-buffer/Android.bp:17:1:
> module "prebuilt_netty-buffer-java-4.1.3.Final" already defined
> prebuilts/tools/common/m2/repository/io/netty/netty-buffer/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/netty/netty-resolver/Android.bp:17:1:
> module "prebuilt_netty-resolver-java-4.1.3.Final" already defined
> prebuilts/tools/common/m2/repository/io/netty/netty-resolver/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/grpc/grpc-protobuf-lite/Android.bp:17:1:
> module "prebuilt_grpc-java-protobuf-lite-1.0.1" already defined
> prebuilts/tools/common/m2/repository/io/grpc/grpc-protobuf-lite/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/robolectric.bp:6:1: module
> "prebuilt_robolectric-ant-1.8.0" already defined
> prebuilts/tools/common/m2/robolectric.bp:6:1 <-- previous definition here error: tools/common/m2/robolectric.bp:11:1: module
> "prebuilt_robolectric-compile-testing-0.15" already defined
> prebuilts/tools/common/m2/robolectric.bp:11:1 <-- previous definition here error: tools/common/m2/robolectric.bp:16:1: module
> "prebuilt_robolectric-diffutils-1.3.0" already defined
> prebuilts/tools/common/m2/robolectric.bp:16:1 <-- previous definition here error: tools/common/m2/robolectric.bp:21:1: module
> "prebuilt_robolectric-httpclient-4.0.3" already defined
> prebuilts/tools/common/m2/robolectric.bp:21:1 <-- previous definition here error: tools/common/m2/robolectric.bp:26:1: module
> "prebuilt_robolectric-httpcore-4.0.1" already defined
> prebuilts/tools/common/m2/robolectric.bp:26:1 <-- previous definition here error: tools/common/m2/robolectric.bp:31:1: module
> "prebuilt_robolectric-javax.annotation-api-1.2" already defined
> prebuilts/tools/common/m2/robolectric.bp:31:1 <-- previous definition here error: tools/common/m2/robolectric.bp:36:1: module
> "prebuilt_robolectric-maven-ant-tasks-2.1.3" already defined
> prebuilts/tools/common/m2/robolectric.bp:36:1 <-- previous definition here error: tools/common/m2/robolectric.bp:41:1: module
> "prebuilt_robolectric-xstream-1.4.8" already defined
> prebuilts/tools/common/m2/robolectric.bp:41:1 <-- previous definition here error: tools/common/m2/robolectric.bp:47:1: module
> "prebuilt_robolectric-sqlite4java-import" already defined
> prebuilts/tools/common/m2/robolectric.bp:47:1 <-- previous definition here error: tools/common/m2/robolectric.bp:53:1: module
> "robolectric-sqlite4java-native" already defined
> prebuilts/tools/common/m2/robolectric.bp:53:1 <-- previous definition here error: tools/common/m2/robolectric.bp:73:1: module
> "robolectric-sqlite4java-0.282" already defined
> prebuilts/tools/common/m2/robolectric.bp:73:1 <-- previous definition here error: tools/common/m2/robolectric.bp:87:1: module
> "prebuilt_robolectric-assertj-core-3.8.0" already defined
> prebuilts/tools/common/m2/robolectric.bp:87:1 <-- previous definition here error: tools/common/m2/robolectric.bp:92:1: module
> "prebuilt_robolectric-monitor-1.0.2-alpha1" already defined
> prebuilts/tools/common/m2/robolectric.bp:92:1 <-- previous definition here 16:40:40 soong bootstrap failed with: exit status 1
>
> #### failed to build some targets (5 seconds) ####
- 尝试 re-syncing 代码库
repo sync --force-sync
- 然后再次尝试构建
source build/envsetup.sh && lunch rpi4-eng && make ramdisk systemimage vendorimage
以下是我安装的所有构建工具:
sudo apt-get install git-core gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig kpartx python-mako gcc-arm-linux-gnueabihf libssl-dev
此特定错误的问题与虚拟机容量不足有关 RAM/swap。该构建需要 16Gb 的 RAM/swap 而 VM 远远不够。扩展交换文件解决了这个问题。现在我还有其他的要弄清楚,但那是不同的 post。
在WSL2下,可能内存不够。 Google增加内存的方法。
而且,我的回购有问题,然后我 运行 按照代码
cd .repo/repo && git pull && cd - && repo sync
我一直在按照说明 (https://github.com/android-rpi/device_arpi_rpi4/blob/arpi-11/README) 为 Raspberry Pi 4 构建 Android 11,并且 运行 遇到了 make 执行的问题。对于我的世界,我无法弄清楚我错过了什么或做错了什么。我试图解决的实际错误是什么?我的假设是缺少依赖项。
>============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=11 TARGET_PRODUCT=rpi4
> TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_ARCH=arm64
> TARGET_ARCH_VARIANT=armv8-a TARGET_CPU_VARIANT=cortex-a72
> HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux
> HOST_OS_EXTRA=Linux-5.4.0-47-generic-x86_64-Linux-Mint-20
> HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64
> HOST_BUILD_TYPE=release BUILD_ID=RP1A.200720.011 OUT_DIR=out
> PRODUCT_SOONG_NAMESPACES=external/mesa3d
> ============================================ [100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja FAILED:
> out/soong/build.ninja out/soong/.bootstrap/bin/soong_build -t -l
> out/.module_paths/Android.bp.list -b out/soong -n out -d
> out/soong/build.ninja.d -globFile out/soon
> g/.bootstrap/build-globs.ninja -o out/soong/build.ninja Android.bp
> error: tools/Android.bp:15:1: module "api-versions-jars-dir" already
> defined
> prebuilts/tools/Android.bp:15:1 <-- previous definition here error:
> tools/common/google-api-services-storage/1.24.1/Android.bp:17:1:
> module "prebuilt_google-api-services-storage" already defined
> prebuilts/tools/common/google-api-services-storage/1.24.1/Android.bp:17:1
> <-- previous definition here error:
> tools/common/google-api-java-client/1.23.0/Android.bp:17:1: module
> "prebuilt_google-api-java-client-min-repackaged" already defined
> prebuilts/tools/common/google-api-java-client/1.23.0/Android.bp:17:1
> <-- previous definition here error:
> tools/common/google-api-services-compute/Android.bp:17:1: module
> "prebuilt_google-api-services-compute" already defined
> prebuilts/tools/common/google-api-services-compute/Android.bp:17:1 <--
> previous definition here error:
> prebuilts/tools/common/netbeans-visual/Android.bp:15:1: module
> "prebuilt_org-netbeans-api-visual" already defined
> tools/common/netbeans-visual/Android.bp:15:1 <-- previous definition here error: tools/common/m2/Android.bp:15:1: module
> "prebuilt_byte-buddy-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:36:1 <-- previous definition here error: tools/linux-x86_64/perfetto/Android.bp:1:1:
> module "prebuilt_perfetto_trace_processor_shell_prebuilt" already
> defined
> prebuilts/tools/linux-x86_64/perfetto/Android.bp:1:1 <-- previous definition here error:
> prebuilts/tools/common/netbeans-visual/Android.bp:21:1: module
> "prebuilt_org-openide-util" already defined
> tools/common/netbeans-visual/Android.bp:21:1 <-- previous definition here error: tools/common/m2/Android.bp:21:1: module
> "prebuilt_diffutils-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:42:1 <-- previous definition here error: tools/linux-x86_64/perfetto/Android.bp:8:1:
> module "perfetto_artifacts" already defined
> prebuilts/tools/linux-x86_64/perfetto/Android.bp:8:1 <-- previous definition here error: tools/common/m2/Android.bp:38:1:
> module "prebuilt_gson-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:49:1 <-- previous definition here error: tools/common/m2/Android.bp:45:1: module
> "prebuilt_guava-listenablefuture-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:56:1 <-- previous definition here error: tools/common/m2/Android.bp:51:1: module
> "prebuilt_mockito2-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:62:1 <-- previous definition here error: tools/common/m2/Android.bp:57:1: module
> "prebuilt_objenesis-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:68:1 <-- previous definition here error: tools/common/m2/Android.bp:62:1: module
> "prebuilt_truth-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:79:1 <-- previous definition here error: tools/common/m2/Android.bp:70:1: module
> "prebuilt_javapoet-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:127:1 <-- previous definition here error: tools/common/m2/Android.bp:75:1: module
> "prebuilt_protobuf-java-util-prebuilt-jar" already defined
> prebuilts/tools/common/m2/Android.bp:137:1 <-- previous definition here error: tools/common/m2/Android.bp:86:1: module
> "prebuilt_trove-prebuilt" already defined
> prebuilts/tools/common/m2/Android.bp:142:1 <-- previous definition here error: tools/common/m2/Android.bp:91:1: module
> "prebuilt_jna-prebuilt" already defined
> prebuilts/tools/common/m2/Android.bp:147:1 <-- previous definition here error: tools/common/m2/Android.bp:96:1: module
> "prebuilt_compile-testing-prebuilt" already defined
> prebuilts/tools/common/m2/Android.bp:152:1 <-- previous definition here error: tools/common/m2/Android.bp:103:1: module
> "truth-prebuilt-host-jar" already defined
> prebuilts/tools/common/m2/Android.bp:159:1 <-- previous definition here error: tools/common/m2/Android.bp:110:1: module
> "mockito-robolectric-prebuilt" already defined
> prebuilts/tools/common/m2/Android.bp:166:1 <-- previous definition here error: tools/common/m2/Android.bp:120:1: module
> "truth-prebuilt" already defined
> prebuilts/tools/common/m2/Android.bp:176:1 <-- previous definition here error: tools/common/m2/Android.bp:132:1: module
> "truth-host-prebuilt" already defined
> prebuilts/tools/common/m2/Android.bp:188:1 <-- previous definition here error: tools/common/m2/Android.bp:137:1: module
> "prebuilt_metalava-tools-common-m2-deps" already defined
> prebuilts/tools/common/m2/Android.bp:202:1 <-- previous definition here error: tools/common/m2/Android.bp:149:1: module
> "prebuilt_dokka-tools-common-m2-deps" already defined
> prebuilts/tools/common/m2/Android.bp:214:1 <-- previous definition here error: tools/common/m2/Android.bp:169:1: module
> "prebuilt_accessibility-test-framework" already defined
> prebuilts/tools/common/m2/Android.bp:233:1 <-- previous definition here error: tools/common/m2/Android.bp:176:1: module
> "prebuilt_javawriter" already defined
> prebuilts/tools/common/m2/Android.bp:240:1 <-- previous definition here error: tools/common/m2/Android.bp:184:1: module
> "prebuilt_kotlinx-metadata-jvm" already defined
> prebuilts/tools/common/m2/Android.bp:282:1 <-- previous definition here error: tools/common/m2/Android.bp:190:1: module
> "prebuilt_auto-common" already defined
> prebuilts/tools/common/m2/Android.bp:288:1 <-- previous definition here error: tools/common/m2/Android.bp:196:1: module
> "prebuilt_antlr4" already defined
> prebuilts/tools/common/m2/Android.bp:294:1 <-- previous definition here error: tools/common/m2/Android.bp:202:1: module
> "prebuilt_auto-value-annotations" already defined
> prebuilts/tools/common/m2/Android.bp:300:1 <-- previous definition here error: tools/common/m2/Android.bp:213:1: module
> "prebuilt_commons-codec" already defined
> prebuilts/tools/common/m2/Android.bp:306:1 <-- previous definition here error: tools/common/m2/Android.bp:219:1: module
> "prebuilt_xerial-sqlite-jdbc" already defined
> prebuilts/tools/common/m2/Android.bp:312:1 <-- previous definition here error: tools/common/m2/Android.bp:225:1: module
> "prebuilt_jetbrains-annotations" already defined
> prebuilts/tools/common/m2/Android.bp:318:1 <-- previous definition here error: tools/common/m2/Android.bp:231:1: module
> "prebuilt_kotlinx-coroutines-core-nodeps" already defined
> prebuilts/tools/common/m2/Android.bp:324:1 <-- previous definition here error: tools/common/m2/Android.bp:237:1: module
> "kotlinx-coroutines-core" already defined
> prebuilts/tools/common/m2/Android.bp:329:1 <-- previous definition here error: tools/common/m2/Android.bp:246:1: module
> "prebuilt_kotlinx-coroutines-android-nodeps" already defined
> prebuilts/tools/common/m2/Android.bp:338:1 <-- previous definition here error: tools/common/m2/Android.bp:252:1: module
> "kotlinx-coroutines-android" already defined
> prebuilts/tools/common/m2/Android.bp:343:1 <-- previous definition here error: tools/common/m2/Android.bp:262:1: module
> "prebuilt_car-androidx-room-compiler-tools-common-m2-deps" already
> defined
> prebuilts/tools/common/m2/Android.bp:353:1 <-- previous definition here error: tools/common/m2/Android.bp:288:1: module
> "prebuilt_protobuf-lite" already defined
> prebuilts/tools/common/m2/Android.bp:374:1 <-- previous definition here error: tools/common/m2/Android.bp:293:1: module
> "prebuilt_jsoup-1.6.3" already defined
> prebuilts/tools/common/m2/Android.bp:379:1 <-- previous definition here error: tools/common/m2/robolectric.bp:1:1: module
> "prebuilt_robolectric-accessibility-test-framework-2.1" already
> defined
> prebuilts/tools/common/m2/robolectric.bp:1:1 <-- previous definition here error:
> tools/common/m2/repository/io/netty/netty-common/Android.bp:17:1:
> module "prebuilt_netty-common-java-4.1.3.Final" already defined
> prebuilts/tools/common/m2/repository/io/netty/netty-common/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/grpc/grpc-context/Android.bp:17:1:
> module "prebuilt_grpc-java-context-1.0.1" already defined
> prebuilts/tools/common/m2/repository/io/grpc/grpc-context/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/netty/netty-handler/Android.bp:17:1:
> module "prebuilt_netty-handler-java-4.1.3.Final" already defined
> prebuilts/tools/common/m2/repository/io/netty/netty-handler/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/netty/netty-codec/Android.bp:17:1:
> module "prebuilt_netty-codec-java-4.1.3.Final" already defined
> prebuilts/tools/common/m2/repository/io/netty/netty-codec/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/netty/netty-transport/Android.bp:17:1:
> module "prebuilt_netty-transport-java-4.1.3.Final" already defined
> prebuilts/tools/common/m2/repository/io/netty/netty-transport/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/net/sf/jopt-simple/jopt-simple/4.9/Android.bp:17:1:
> module "prebuilt_jopt-simple-4.9" already defined
> prebuilts/tools/common/m2/repository/net/sf/jopt-simple/jopt-simple/4.9/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/grpc/grpc-stub/Android.bp:17:1: module
> "prebuilt_grpc-java-stub-1.0.1" already defined
> prebuilts/tools/common/m2/repository/io/grpc/grpc-stub/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/grpc/grpc-protobuf/Android.bp:17:1:
> module "prebuilt_grpc-java-protobuf-1.0.1" already defined
> prebuilts/tools/common/m2/repository/io/grpc/grpc-protobuf/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/grpc/grpc-netty/Android.bp:17:1: module
> "prebuilt_grpc-java-netty-1.0.1" already defined
> prebuilts/tools/common/m2/repository/io/grpc/grpc-netty/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/grpc/grpc-core/Android.bp:17:1: module
> "prebuilt_grpc-java-core-1.0.1" already defined
> prebuilts/tools/common/m2/repository/io/grpc/grpc-core/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/netty/netty-codec-http2/Android.bp:17:1:
> module "prebuilt_netty-codec-http2-java-4.1.3.Final" already def ined
> prebuilts/tools/common/m2/repository/io/netty/netty-codec-http2/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/netty/netty-buffer/Android.bp:17:1:
> module "prebuilt_netty-buffer-java-4.1.3.Final" already defined
> prebuilts/tools/common/m2/repository/io/netty/netty-buffer/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/netty/netty-resolver/Android.bp:17:1:
> module "prebuilt_netty-resolver-java-4.1.3.Final" already defined
> prebuilts/tools/common/m2/repository/io/netty/netty-resolver/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/repository/io/grpc/grpc-protobuf-lite/Android.bp:17:1:
> module "prebuilt_grpc-java-protobuf-lite-1.0.1" already defined
> prebuilts/tools/common/m2/repository/io/grpc/grpc-protobuf-lite/Android.bp:17:1
> <-- previous definition here error:
> tools/common/m2/robolectric.bp:6:1: module
> "prebuilt_robolectric-ant-1.8.0" already defined
> prebuilts/tools/common/m2/robolectric.bp:6:1 <-- previous definition here error: tools/common/m2/robolectric.bp:11:1: module
> "prebuilt_robolectric-compile-testing-0.15" already defined
> prebuilts/tools/common/m2/robolectric.bp:11:1 <-- previous definition here error: tools/common/m2/robolectric.bp:16:1: module
> "prebuilt_robolectric-diffutils-1.3.0" already defined
> prebuilts/tools/common/m2/robolectric.bp:16:1 <-- previous definition here error: tools/common/m2/robolectric.bp:21:1: module
> "prebuilt_robolectric-httpclient-4.0.3" already defined
> prebuilts/tools/common/m2/robolectric.bp:21:1 <-- previous definition here error: tools/common/m2/robolectric.bp:26:1: module
> "prebuilt_robolectric-httpcore-4.0.1" already defined
> prebuilts/tools/common/m2/robolectric.bp:26:1 <-- previous definition here error: tools/common/m2/robolectric.bp:31:1: module
> "prebuilt_robolectric-javax.annotation-api-1.2" already defined
> prebuilts/tools/common/m2/robolectric.bp:31:1 <-- previous definition here error: tools/common/m2/robolectric.bp:36:1: module
> "prebuilt_robolectric-maven-ant-tasks-2.1.3" already defined
> prebuilts/tools/common/m2/robolectric.bp:36:1 <-- previous definition here error: tools/common/m2/robolectric.bp:41:1: module
> "prebuilt_robolectric-xstream-1.4.8" already defined
> prebuilts/tools/common/m2/robolectric.bp:41:1 <-- previous definition here error: tools/common/m2/robolectric.bp:47:1: module
> "prebuilt_robolectric-sqlite4java-import" already defined
> prebuilts/tools/common/m2/robolectric.bp:47:1 <-- previous definition here error: tools/common/m2/robolectric.bp:53:1: module
> "robolectric-sqlite4java-native" already defined
> prebuilts/tools/common/m2/robolectric.bp:53:1 <-- previous definition here error: tools/common/m2/robolectric.bp:73:1: module
> "robolectric-sqlite4java-0.282" already defined
> prebuilts/tools/common/m2/robolectric.bp:73:1 <-- previous definition here error: tools/common/m2/robolectric.bp:87:1: module
> "prebuilt_robolectric-assertj-core-3.8.0" already defined
> prebuilts/tools/common/m2/robolectric.bp:87:1 <-- previous definition here error: tools/common/m2/robolectric.bp:92:1: module
> "prebuilt_robolectric-monitor-1.0.2-alpha1" already defined
> prebuilts/tools/common/m2/robolectric.bp:92:1 <-- previous definition here 16:40:40 soong bootstrap failed with: exit status 1
>
> #### failed to build some targets (5 seconds) ####
- 尝试 re-syncing 代码库
repo sync --force-sync
- 然后再次尝试构建
source build/envsetup.sh && lunch rpi4-eng && make ramdisk systemimage vendorimage
以下是我安装的所有构建工具:
sudo apt-get install git-core gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig kpartx python-mako gcc-arm-linux-gnueabihf libssl-dev
此特定错误的问题与虚拟机容量不足有关 RAM/swap。该构建需要 16Gb 的 RAM/swap 而 VM 远远不够。扩展交换文件解决了这个问题。现在我还有其他的要弄清楚,但那是不同的 post。
在WSL2下,可能内存不够。 Google增加内存的方法。 而且,我的回购有问题,然后我 运行 按照代码
cd .repo/repo && git pull && cd - && repo sync