Android System compilation Error

Source: Internet
Author: User

The following error occurred during the Android7.1 compilation process:

starting build with ninjaninja: entering directory  '. '  [  0% 8/30301] Ensure Jack server is installed and  startedjack server already installed in  "/home/guochongxin/.jack-server" Launching  jack server java -xx:maxjavastacktracedepth=-1 -djava.io.tmpdir=/tmp - Dfile.encoding=utf-8 -xx:+tieredcompilation -cp /home/guochongxin/.jack-server/launcher.jar  com.android.jack.launcher.serverlauncher[  0% 10/30301] building with jack :  out/target/common/obj/java_libraries/libprotobuf-java-micro_intermediates/classes.jack[  0%  12/30301] building with jack: out/target/common/obj/java_libraries/framework_ Intermediates/with-local/classes.dexfailed: /bin/bash out/target/common/obj/java_libraries/framework _intermediates/with-local/classes.dex.rspout of memory error  (version 1.2-rc4  ' Carnac '   (298900 f95d7bdecfceb327f9d201a1348397ed8a843843  by [email protected]). Gc overhead limit exceeded. try increasing heap size with java option  '-Xmx<size> '. Warning: this may have produced partial or corrupted output. [  0% 12/30301] compiling sdk stubs with jack: out/target/comm ... Ava_libraries/android_stubs_current_intermediates/classes.jackninja: build stopped: subcommand  failed.make: *** [ninja_wrapper] error 1

You can see the following sentence from the above error message:

Try increasing heap size with Java option '-xmx<size> '.

Following the suggested statements above, we modified the Prebuilts/sdk/tools/jack-admin file as follows: 1. Find the following statement:

jack_server_command= "java-xx:maxjavastacktracedepth=-1-djava.io.tmpdir= $TMPDIR $JACK _SERVER_VM_ARGUMENTS-CP $ Launcher_jar $LAUNCHER _name "

2. Modify the above statement to:

jack_server_command= "java-xx:maxjavastacktracedepth=-1-djava.io.tmpdir= $TMPDIR $JACK _server_vm_arguments - xmx4096m -cp $LAUNCHER _jar $LAUNCHER _name "

The main is to add the-xmx4096m parameter, next in the source directory to execute the following command to restart the Jack-admin service:

./prebuilts/sdk/tools/jack-admin Stop-server

./prebuilts/sdk/tools/jack-admin Start-server

After restarting the Jack-admin service, the compile command can be compiled and passed again at this point.


This article is from the "canvas shoes can walk the cat step" blog, please be sure to keep this source http://9409270.blog.51cto.com/9399270/1957117

Android System compilation Error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.