The JDK memory overflow error occurred when Android 7.1 was compiled to 33%:
1.2 ' Carnac ' (298900 f95d7bdecfceb327f9d201a1348397ed8a843843 by android-jack-'-xmx<size> 'partial or corrupted output.
The error log lists the problems and has given the solution-increasing the size of the Java Virtual Machine -Xmx
, which is to set a large heap memory limit.
So the solution is:
1 . Modify Jack's configuration fileprebuilts/sdk/tools/jack-admin
This is a shell script that manages Jack and finds start-server
function to modify its startup parameters directly from the original
jack_server_command="java-xx:maxjavastacktracedepth=-1-djava.io.tmpdir= $TMPDIR $JACK _server_vm_ ARGUMENTS-CP $LAUNCHER _jar $LAUNCHER _name"
Change to
jack_server_command="java-xx:maxjavastacktracedepth=-1-djava.io.tmpdir= $TMPDIR $JACK _server_vm_ ARGUMENTS-cp $LAUNCHER _jar $LAUNCHER _name"
At this point the Jack server is still executing in the background, so we need to stop it and restart it ( make
the jack Server will start automatically) to make the modified parameters effective.
We execute the following command at this point, the Jack server is still in the background, so we need to stop it, and then restart the boot ( make
the jack Server will start automatically) to make the modified parameters take effect.
We execute the following command:
#先停止服务. /prebuilts/sdk/tools/jack-admin stop-Server
#重新开始服务. /prebuilts/sdk/tools/jack-admin Start-server
The detailed error log lists the issues and the solution has been given-increasing the Java Virtual machine's -Xmx
size, that is, set a large heap memory cap.
FIX: Compile CM14.1 hint Jack "Out of memory Error" error