如下所示:
創(chuàng)新互聯(lián)公司于2013年創(chuàng)立,是專業(yè)互聯(lián)網(wǎng)技術服務公司,擁有項目成都網(wǎng)站制作、成都網(wǎng)站設計、外貿(mào)營銷網(wǎng)站建設網(wǎng)站策劃,項目實施與項目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元奉賢做網(wǎng)站,已為上家服務,為奉賢各地企業(yè)和個人服務,聯(lián)系電話:18982081108
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'.
Warning: This may have produced partial or corrupted output.
ninja: build stopped: subcommand failed.
在文件/prebuilts/sdk/tools/jack-admin中修正-Xmx參數(shù)。
1、修改變量JACK_SERVER_VM_ARGUMENTS,添加參數(shù) -Xmx2048M
JACK_SERVER_VM_ARGUMENTS="${JACK_SERVER_VM_ARGUMENTS:=-Dfile.encoding=UTF-8 -XX:+TieredCompilation -mx2048M}"
2、進一步修正重啟參數(shù)(該步驟可以省略)
找到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 (
補充知識:編譯android 7.0 出現(xiàn)Try increasing heap size with java option '-Xmx'錯誤解決方案
出現(xiàn)這個錯誤是由于電腦內(nèi)存不足,在命令行分別執(zhí)行以下三條語句,然后繼續(xù)編譯
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
以上這篇解決Android 源碼編譯錯誤的問題就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持創(chuàng)新互聯(lián)。