美文网首页
AndroidQ-build

AndroidQ-build

作者: James999 | 来源:发表于2020-07-24 22:54 被阅读0次

    build环境

    我就不啰嗦了,参考
    虽然参考了大侠的,但是每个人的环境不同,所以建议大家做好心理准备。
    几经周折还是code 还是下载下来了,接下来开始build.

    图片.png

    开始build

    1. source build/envsetup.sh
    2. lunch aosp_walleye-eng
      这一步要确认,你的room用在什么设备上,我的是用在Pixel 2上的。
      且是eng模式,所以lunch的时候使用aosp_walleye-eng命令
    ============================================
    PLATFORM_VERSION_CODENAME=REL
    PLATFORM_VERSION=10
    TARGET_PRODUCT=aosp_walleye
    TARGET_BUILD_VARIANT=eng
    TARGET_BUILD_TYPE=release
    TARGET_ARCH=arm64
    TARGET_ARCH_VARIANT=armv8-a
    TARGET_CPU_VARIANT=cortex-a73
    TARGET_2ND_ARCH=arm
    TARGET_2ND_ARCH_VARIANT=armv8-a
    TARGET_2ND_CPU_VARIANT=cortex-a73
    HOST_ARCH=x86_64
    HOST_2ND_ARCH=x86
    HOST_OS=linux
    HOST_OS_EXTRA=Linux-5.4.0-42-generic-x86_64-Ubuntu-20.04-LTS
    HOST_CROSS_OS=windows
    HOST_CROSS_ARCH=x86
    HOST_CROSS_2ND_ARCH=x86_64
    HOST_BUILD_TYPE=release
    BUILD_ID=QQ3A.200605.002.A1
    OUT_DIR=out
    PRODUCT_SOONG_NAMESPACES=device/google/wahoo vendor/google/camera hardware/google/pixel
    ============================================
    
    1. build error:
    FAILED: out/target/product/walleye/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_element.bc
    /bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-3289846/bin/clang -Iframeworks/rs/script_api/include -Iexternal/clang/lib/Headers -MD -DRS_VERSION=24 -std=c99 -c -O3 -fno-builtin -emit-llvm -target renderscript64-linux-android -fsigned-char  -Wno-deprecated -Werror  -Werror -Wall -Wextra -Iframeworks/rs/cpu_ref -DRS_DECLARE_EXPIRED_APIS  -DARCH_ARM64_HAVE_NEON -x renderscript frameworks/rs/driver/runtime/rs_element.c -o out/target/product/walleye/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_element.bc"
    prebuilts/clang/host/linux-x86/clang-3289846/bin/clang.real: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
    18:18:46 ninja failed with: exit status 1
    
    #### failed to build some targets (02:43 (mm:ss)) ####
    
    

    fix:
    sudo apt-get install libncurses5

    1. build error (2)
    stubsDir && (if false; then out/soong/host/linux-x86/bin/soong_zip -write_if_changed -d -o  -C  -D ; fi) && rm -rf "out/soong/.intermediates/frameworks/base/hiddenapi-lists-docs/android_common/srcjars"
    Picked up _JAVA_OPTIONS: "-Xmx16g"
    Killed
    [ 90% 88400/98220] //frameworks/base:test-api-stubs-docs Metalava [common]
    Picked up _JAVA_OPTIONS: "-Xmx16g"
    [ 90% 88401/98220] //frameworks/base:api-stubs-docs Metalava [common]
    Picked up _JAVA_OPTIONS: "-Xmx16g"
    [ 90% 88402/98220] //frameworks/base:system-api-stubs-docs Metalava [common]
    Picked up _JAVA_OPTIONS: "-Xmx16g"
    21:59:41 ninja failed with: exit status 1
    
    #### failed to build some targets (03:22:55 (hh:mm:ss)) ####
    
    

    抱着侥幸的心理状态,又执行了一遍 “make -j4”,居然过了。

    [ 97% 9605/9819] //frameworks/av/apex:com.android.media signapk [common]
    Picked up _JAVA_OPTIONS: "-Xmx16g"
    [ 97% 9608/9819] R8: out/target/common/obj/APPS/Dialer_intermediates/dex/classes.dex
    Picked up _JAVA_OPTIONS: "-Xmx16g"
    [ 97% 9611/9819] //art/build/apex:com.android.runtime.debug signapk [common]
    Picked up _JAVA_OPTIONS: "-Xmx16g"
    [ 97% 9612/9819] target Package: Dialer (out/target/product/walleye/obj/APPS/Dialer_intermediates/package.apk)
    Picked up _JAVA_OPTIONS: "-Xmx16g"
    [ 98% 9630/9819] //art/build/apex:art-check-debug-apex-gen generate art-check-debug-apex-gen.dummy
    --bitness=auto, trying to autodetect. This may be incorrect!
      Detected multilib
    [100% 9819/9819] Target vbmeta image: out/target/product/walleye/vbmeta.img
    
    #### build completed successfully (32:55 (mm:ss)) ####
    
    

    参考:

    https://source.android.google.cn/setup/build/building
    https://source.android.google.cn/setup/build/running#selecting-device-build
    https://blog.csdn.net/m0_46702738/article/details/106059563
    https://blog.csdn.net/longintchar/article/details/79619465

    相关文章

      网友评论

          本文标题:AndroidQ-build

          本文链接:https://www.haomeiwen.com/subject/rwojlktx.html