Android系统之编译Intel5.1问题解决

本文概述了在Android开发过程中遇到的多个技术问题,如Java版本不匹配、环境配置错误、编译器链接问题、源文件缺失和API更新冲突,以及相应的解决方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.jdk问题:

************************************************************
You are attempting to build with the incorrect version
of java.
 
Your version is: openjdk version "1.7.0_75" OpenJDK Runtime Environment (build 1.7.0_75-b13) OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode).
The required version is: "1.7.x"
 
Please follow the machine setup instructions at
    https://source.android.com/source/initializing.html
************************************************************
build/core/main.mk:167: *** stop.  Stop.

在这里插入图片描述

解决方案:
在这里插入图片描述

2.环境问题

flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.

在这里插入图片描述

解决方案:
export LC_ALL=C

3.ld问题

prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error:
unsupported reloc 43

在这里插入图片描述

解决办法:
cp /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/x86_64-linux/bin/ld

4.relocs.c

/usr/bin/ld: arch/x86/tools/relocs_64.o:(.bss+0x0): multiple definition of `per_cpu_load_addr'; arch/x86/tools/relocs_32.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[3]: *** [scripts/Makefile.host:127: arch/x86/tools/relocs] Error 1
make[2]: *** [/home/soft/workspace/android5.1/intel_1/cht_5.1_1117/kernel/cht/arch/x86/Makefile:179: archscripts] Error 2
make[2]: *** Waiting for unfinished jobs....

在这里插入图片描述

解决办法:
在这里插入图片描述

5. CSSGrammar.hpp: No such file or directory

/home/soft/workspace/android5.1/intel_1/cht_5.1_1117/out/target/product/cht_cr_mrd/obj/GYP/shared_intermediates/blink/core/CSSGrammar.cpp:160:26: fatal error: CSSGrammar.hpp: No such file or directory
 #include "CSSGrammar.hpp"
                          ^
compilation terminated.
make: *** [build/core/binary.mk:641: out/target/product/cht_cr_mrd/obj/STATIC_LIBRARIES/third_party_WebKit_Source_core_webcore_generated_gyp_intermediates/CSSGrammar.o] Error 1
make: *** Waiting for unfinished jobs....
/home/soft/workspace/android5.1/intel_1/cht_5.1_1117/out/target/product/cht_cr_mrd/obj/GYP/shared_intermediates/blink/core/XPathGrammar.cpp:124:28: fatal error: XPathGrammar.hpp: No such file or directory
 #include "XPathGrammar.hpp"
                            ^
compilation terminated.
make: *** [build/core/binary.mk:641: out/target/product/cht_cr_mrd/obj/STATIC_LIBRARIES/third_party_WebKit_Source_core_webcore_generated_gyp_intermediates/XPathGrammar.o] Error 1

#### make failed to build some targets (11:57 (mm:ss)) ####

在这里插入图片描述

解决办法:
rm -rf out/target/product/cht_cr_mrd/obj/GYP/shared_intermediates/blink/core
在这里插入图片描述
重新编译

6.update-api

******************************
You have tried to change the API from what has been previously approved.

To make these errors go away, you have two choices:
   1) You can add "@hide" javadoc comments to the methods, etc. listed in the
      errors above.

   2) You can update current.txt by executing the following command:
         make update-api

      To submit the revised current.txt to the main Android repository,
      you will need approval.
******************************

在这里插入图片描述

. build/envsetup.sh
lunch cht_cr_mrd-user
make update-api

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

有头发的猿

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值