Android Stuido Good card what to do? Don't worry, bro, teach you.

Source: Internet
Author: User

Recently, using Android Studio to develop the app, compile the time special card, often stuck dead. My machine i3 + 8G, according to the principle of smooth running a androidstudio is more than enough ...

So in the major forums to find solutions, recorded here. Let the brothers who are connected with the disease be free early ....


Method One: Open the Gradle individual daemon

Create the Gradle.properties file under the following folder:

    • /home/<username>/.gradle/(Linux)
    • /users/<username>/.gradle/(MAC)
    • C:\users\<username>\.gradle (Windows)

and add in the file:

Org.gradle. daemon= true

At the same time, the Gradle.properties file under the project can also be optimized:

<span style= "FONT-SIZE:14PX;" ># project-wide Gradle settings.# IDE (e.g. Android Studio) users:# settings specified in this file would override any G Radle settings# configured through the ide.# for more details about how to configure your build environment visit# http://www . gradle.org/docs/current/userguide/build_environment.html# the Gradle daemon aims to improve the startup and execution Ti  Me of gradle.# When set to True the Gradle daemon are to run the build.# todo:disable daemon in CI, since builds should be Clean and reliable in serversorg.gradle.daemon= true# specifies the JVM arguments used for the daemon process.# the Setti Ng is particularly useful for tweaking memory settings.# Default value:-xmx10248m-xx:maxpermsize=256morg.gradle.jvmargs =-xmx2048m-xx:maxpermsize= m-xx:+heapdumponoutofmemoryerror-dfile.encoding=utf-8# when configured, Gradle'll ru N in incubating parallel mode.# This option should only being used with decoupled projects. More details, visit# http//Www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projectsorg.gradle.parallel= true # enables new incubating mode, makes Gradle selective when configuring projects.# only relevant projects is configure D which results in faster builds for large multi-projects.# http://www.gradle.org/docs/current/userguide/multi_project_ Builds.html#sec:configuration_on_demandorg.gradle.configureondemand= true</span>

At the same time, these parameters can also be configured in the Gradle.properties file under the previous user folder. That would not be for a project to take effect, but for all projects.

The above configuration file is mainly done, increase the size of the Java Virtual machine gradle execution, let gradle at compile time use independent process, let gradle can parallel execution.


Method Two: Add Androidstudio of execution memory

Operations for example with:

1. Open the Bin folder under the Androidstudio installation path

2. Locate the studio.exe.vmoptions and studio64.exe.vmoptions files



3, change the value in the above 2 files (after I change)

These values are multiplied by 2, at least on the original basis. Let's say it's a memory trench. Can be as large as possible.



My Androidstudio after the above configuration. Can run to fly, huh ah ha!

Brother is still waiting for what. Fly Up!

。 SAO years

Android Stuido Good card what to do? Don't worry, bro, teach you.

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.