Android 源码编译错误

参考文章:http://blog.csdn.net/brightming/article/details/49763515/

Building with Jack: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex
FAILED: /bin/bash out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex.rsp
Out of memory error (version 1.2-a26 'Carnac' (291201 fcd657165d2fd6dcf1bf4c3002c9c8f75383e815 by android-jack-team@google.com)).
GC overhead limit exceeded.
Try increasing heap size with java option '-Xmx<size>'.
Warning: This may have produced partial or corrupted output.
ninja: build stopped: subcommand failed.

在文件/prebuilts/sdk/tools/jack-admin中修正-Xmx参数。

1、修改变量JACK_SERVER_VM_ARGUMENTS,添加参数 -Xmx2048M

JACK_SERVER_VM_ARGUMENTS="${JACK_SERVER_VM_ARGUMENTS:=-Dfile.encoding=UTF-8 -XX:+TieredCompilation -mx2048M}"

2、进一步修正重启参数(该步骤可以省略)

找到jack-admin中的start-server语句,直接在里面增加:

start-server)

isServerRunning

RUNNING=$?

if [ "$RUNNING" = 0 ]; then

echo "Server is already running"

else

echo "before to start-server,JACK_SERVER_VM_ARGUMENTS=" $JACK_SERVER_VM_ARGUMENTS

JACK_SERVER_COMMAND="java -Djava.io.tmpdir=$TMPDIR $JACK_SERVER_VM_ARGUMENTS-Xmx2048M -cp $LAUNCHER_JAR $LAUNCHER_NAME"

echo "Launching Jack server" $JACK_SERVER_COMMAND

(

上一篇:在 mysql 中利用 Duplicate key, 一句话实现存在的更新不存在插入功能


下一篇:CSS3笔记