
Improve your experience on Android Studio
Android Studio is our daily tool. It is essential to have the best experience while coding. So here is a list of simple customization tips for your favorite IDE.

1. Increase Android Studio memory
By default the RAM allocated to the IDE is 1280MB. If you’re an Android Developer and your machine allows it, it is strongly recommended to increase it. Especially if you happen to launch several projects simultaneously and thus several instances of Android Studio.
- Click Help > Edit Custom VM Options to open your
studio.vmoptions
file.

- Change the default value of
Xmx
&XX:MaxPermSize
-Xmx1280m
-XX:MaxPermSize=350m
Increase from 1280m to 4096m & increase MaxPermSize from 350m to 1024m:
-Xmx4096m
-XX:MaxPermSize=1024m
- Save your changes to the
studio.vmoptions
file, and restart Android Studio for your changes to take effect.
2. Show memory indicator on Android Studio
After increasing the RAM of your IDE, it can be interesting to display it to know exactly what is used in real time but also to be able to clear it in a simple click.
- Click Preferences > Appearance & Behavior > Appearance

- In Window Options section, enable Show memory indicator

- You can now see the memory indicator at the bottom right of Android Studio.

3. Custom Logcat Color
Logs are often unreadable in the Android Studio Logcat. There are only two different colors to differentiate the 6 types of logs: Assert, Debug, Error, Info, Verbose and Warning.

This is why I propose you a new list of personalization allowing to improve considerably the readability of your logs.
To change the color of a log type we need to simply deselect “Inherit values from:” and change the color from the picker:

Here is the list of colors by log type that I recommend:
- DEBUG:
#3D9D2A
- ERROR:
#D80D15
- INFO:
#B7AB4C
- WARN:
#BB4767
Here is the result after the color change:

4. File and code templates
Here is one of my favorite features of Android Studio that is not enough used: File and Code Templates.
- Click Preferences > Editor > File and Code Templates

- Click on + to create your custom code templates.
Example, RecyclerViewAdapter in Kotlin:

- Now Right click where you want to create a new file with your template. Click New > YourTemplate (here is RecyclerViewAdapter)


Conclusion
Android Studio is based on IntelliJ IDEA which offers many options. There are many options to improve your everyday use. Taking the time to understand how to use your IDE is as important as how you code.