How to make Android Studio Lightning Fast?

Ankush Kapoor
2 min readFeb 8, 2020

--

Published by Ankush Kapoor — Android Developer at Paytm

It's pretty annoying waiting for the build to complete. Fortunately, there are some ways which will help you to reduce the build time. Just follow the article and the difference will be huge.

1. Edit Custom VM Options

Edit Custom VM Options
  1. Goto Help -> Edit Custom VM Options
  2. If studio.vmoptions doesn’t exist you will get a popup asking to create the file. So click on create.
  3. Copy-paste the below code snippet
studio.vmoptions

Understanding studio.vmoptions

“Xms1G” — This sets the initial size of the heap to 1 GB.
Xmx3096m” — This is the RAM allocated to Android Studio.

The remaining fields can be used as such. For more detailed understanding visit https://developer.android.com/studio/intro/studio-config.html

Note: My system’s RAM is 8GB so I have configured studio.vmoptions according to my system’s RAM. You can increase or decrease the memory size accoring to your system’s RAM.

2. Disable unused Plugins

Plugins increase the load time of Android Studio. So the below mentioned unused plugins can be disabled.

  1. Goto Android Studio -> Preferences (on mac)
    File -> Settings (on Windows)
  2. Search for Plugins (Open installed plugins tab)
  3. Uncheck these plugins
    Android Games
    App Links Assistant
    Firebase App Indexing
    Firebase Services
    Firebase Testing
    Google Cloud Tools Core
    Google Cloud Tools For Android Studio
    Google Login
    Subversion

Other unused plugins can also be unselected.

Don’t uncheck if you are using them.

3. Enable Gradle Offline Work

For Windows

  1. Go to File -> Settings.
    And open the 'Build,Execution,Deployment'. Then open the Gradle
  2. Uncheck -> Offline work on the right. Click the OK button. Then Rebuild the Project.

For Mac OS:-
Goto Android Studio -> Preferences, and the rest is the same.

Don’t forget to hit the clap button :)

--

--