b300问题记录
1. 编译Android报错
1. lex报错
现象
Server is already running
[ 0% 23/59782] Lex: applypatch <= bootable/recovery/edify/lexer.ll
FAILED: out/target/product/virgo-perf1/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp
/bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -oout/target/product/virgo-perf1/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp bootable/recovery/edify/lexer.ll"
flex-2.5.39: loadlocale.c:130:_nl_intern_locale_data: ?? 'cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' ???
Aborted (core dumped)
[ 0% 28/59782] //frameworks/base/libs/androidfw:libandroidfw clang++ AssetManager.cpp [linux]
ninja: build stopped: subcommand failed.
16:13:39 ninja failed with: exit status 1
解决
在.bashrc中加变量
export LC_ALL=C
2. out of memery
现象
[ 76% 45967/59739] Building with Jack: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex
FAILED: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex
/bin/bash out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex.rsp
Out of memory error (version 1.3-rc7 'Douarn' (445000 d7be3910514558d6715ce455ce0861ae2f56925a by android-jack-team@google.com)).
Java heap space.
Try increasing heap size with java option '-Xmx<size>'.
Warning: This may have produced partial or corrupted output.
[ 76% 45972/59739] //art/runtime:libartd clang++ entrypoints/quick/quick_jni_entrypoints.cc [linux]
ninja: build stopped: subcommand failed.
解决
命令行执行以下命令
export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4g"
./prebuilts/sdk/tools/jack-admin kill-server
./prebuilts/sdk/tools/jack-admin start-server