Fine-tune Android Studio with JVM options for smooth experience

android-studio-logo

As android developers we love Android Studio since it make our lives much more easier. If you are a developer form a eclipse (Hats off for the big boss) era I don’t want to say anything. You may feel android studio like a heaven.

With Intelij engine and gradle android development come a long way. But you know, gradle is in fact quire resource hungry guy. Even for a simple “Hello World” application the daemon might use very well up to 150MB or even more. When it comes to multi module production level application we should provide enough resources for gradle.

You may have already experienced slowness or unresponsiveness in android studio with the latest updates (Mostly 3.1.x). When the default memory allocation of android studio  is not enough for your project you have to face this definitely. Only thing we have to do is allocate enough resources.

What you need to do is create a studio.vmoptions file in android studio settings folder. (For 64 bit version it’s   studio64.vmoptions )

Click Help > Edit Custom VM Options to open your studio.vmoptions file. (or you can create the file manually in side bin directory in  android studio installation directory e.g. : C:\Program Files\Android\Android Studio)

Then add below configuration to  studio64.vmoptions file

  • Runs JVM in Server mode with more optimizations and resources usage
    It may slow down the startup, but if you usually keep IDE running for few hours/days
    JVM may profile and optimize IDE better. Feel free to remove this flag.

  • Sets the initial size of the heap, default value is 256m

  • Max size of the memory allocation pool, default value is 1280m

  • Sets the size of the allocated class metadata space that will trigger a GC the first time it is exceeded, default max value is 350m

 

Now your  studio64.vmoptions file should look like this.

Restart the Android Studio and feel the difference.

Happy coding :)

 

Credits : https://github.com/artem-zinnatullin/AndroidStudio-VM-Options

7 thoughts on “Fine-tune Android Studio with JVM options for smooth experience

  • July 9, 2018 at 6:59 pm
    Permalink

    I must express my thanks to this writer just for bailing me out of this type of condition. After surfing around throughout the world-wide-web and getting views that were not productive, I assumed my life was over. Being alive devoid of the solutions to the difficulties you have resolved by means of the website is a critical case, and the ones that could have in a negative way damaged my entire career if I hadn’t encountered your website. Your personal natural talent and kindness in taking care of all things was very useful. I’m not sure what I would have done if I had not discovered such a subject like this. I am able to at this moment relish my future. Thanks very much for the specialized and effective help. I won’t think twice to propose your web blog to any person who requires direction on this area.

    Reply
  • July 14, 2018 at 4:44 am
    Permalink

    Thanks so much for providing individuals with a very wonderful chance to check tips from this blog. It really is so brilliant and also stuffed with a lot of fun for me and my office peers to visit the blog particularly thrice in one week to read through the newest secrets you have got. Not to mention, I am always amazed with your effective hints you serve. Some two ideas in this article are surely the very best we’ve had.

    Reply
  • July 17, 2018 at 3:50 am
    Permalink

    You made some respectable points there. I regarded on the web for the issue and located most individuals will associate with along with your website.

    Reply
  • July 18, 2018 at 11:04 am
    Permalink

    I am only commenting to make you understand of the wonderful discovery our girl enjoyed visiting your web site. She came to understand so many details, which included how it is like to possess an incredible teaching style to have others without hassle know just exactly some tortuous matters. You truly did more than her expectations. I appreciate you for offering the valuable, trusted, explanatory as well as cool guidance on that topic to Janet.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *