We all know that android studio is a powerful tool to make android application with efficiency and high compatibility. And it is receiving frequent support and updates from google to keep up with latest android versions.
So it is highly recommended for a developer who is focused on making optimized android applications and android studio also support native android application development which allows android developers to build performance-critical portions of their apps by using native (C/C++) code.
This provide benefits in form of reuse of existing code and increased speed.
Android studio is available on all major platforms like Windows, Linux and Mac.
Most of the users are using the windows version and complaints about its slow performance on windows platform and if you use an emulator then its a nightmare.
It is mainly because of the porting of Linux libraries into DLLs which makes the windows version more sluggish also the Android Studio uses Gradle-based build system for the building which is slow.
But from my observation latest versions are better in performance comparing the old ones especially from Android Studio v2.2.0
So how to make android studio faster ?
Well I’m going to describe what I do
First I Enable Offline Work & use local gradle distribution (make sure you have the latest gradle distribution in PC).
It makes android studio to stop look for frequent dependency checks every time and it uses dependencies that are locally available
To enable offline work Go to File >> Settings >> Gradle
and Check Offline work and use local gradle distribution
Go to Settings again and select compiler check ‘Compile independent modules in parallel (may require larger heap size)‘
and in ‘Command-line Options ‘ enter ” –offline ”
Click Apply then OK
Now go to your C:\Users\user_name\.gradle Folder
There is a file called gradle.properties >> Open it in notepad and enter these lines
This will help your project to enable parallel builds and will help your projects with multiple modules to be built in parallel, which should make large or modular projects build faster.
- Use an SSD (I recommend Samsung EVO 850 series) instead of harddisk for your PC or laptop which will make compile and build times significantly faster (Trust me a huge difference, I’m using it myself )
- Add more RAM – 8GB recommended
- Use a third party lightweight emulator (Recommended – Genymotion ) if you are not using real devices