Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio is very slow

I have a project with about 20 modules inside. Gradle clean takes about 5min. As ell if i add a new module gradle update projects needs more than 5min.

There are no dependencies to external libraries. Dependencies are only inside the project between several modules.

I had same Project without gradle and it worked fine. I did not convert the old project to gradle. I have created a new project with the file structure recomended by gradle. But with this performance this is not very usefull...

Any idea what's going wrong with gradle?

like image 338
user2861672 Avatar asked Oct 09 '13 07:10

user2861672


People also ask

Why is Android Studio running so slow?

There may be many plugins in Android Studio that you are not using it. Disabling it will free up some space and reduce complex processes. To do so, Open Preferences >> Plugins and Disable the plugins you are not using.

Is 4gb enough Android Studio?

According to developers.android.com, minimum requirement for android studio is: 4 GB RAM minimum, 8 GB RAM recommended. 2 GB of available disk space minimum, 4 GB Recommended (500 MB for IDE + 1.5 GB for Android SDK and emulator system image)

Is 8GB RAM enough for Android development?

Android Studio requires 8GB RAM or more for Windows, Mac, and Linux. Xcode as well requires 8GB or more of RAM for a smooth workflow. If you are using Xamarin and MS Visual Studio, 8GB of RAM is recommended. This means that the minimum amount of RAM you will need for mobile application development is 8GB.


1 Answers

Just create a file named gradle.properties in the following directory:

/home/<username>/.gradle/ (Linux)
/Users/<username>/.gradle/ (Mac)
C:Users<username>.gradle (Windows)

Add this line to the file:

org.gradle.daemon=true

Source: https://www.timroes.de/2013/09/12/speed-up-gradle/

like image 178
Yster Avatar answered Sep 28 '22 01:09

Yster