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