0

I'm using Android Studio 1.2.2 on Arch and sometimes when i build the project the background task "Gradle: Executing Tasks [:app:assembleDebug]" gets stuck and never finish. This seems to happen randomly. It's also not possible to close Android Studio. I can stop the process but when i start Android Studio again the same problem occurs again. Only when i restart the entire system Android Studio works again.

The answers here did not help: How to fix Android Studio getting stuck executing Gradle tasks?

Community
  • 1
  • 1
Eknoes
  • 349
  • 4
  • 6
  • 17
  • Check http://stackoverflow.com/questions/25629368/how-to-fix-android-studio-getting-stuck-executing-gradle-tasks kradragon's answer. – user3805252 Jul 22 '15 at 16:50

1 Answers1

2

The fact that this only happens "sometimes" makes me think it's your system's resources. You may be using too much memory and as a result, Android Studio doesn't have enough memory to effectively compile and run your code.

Try closing every other program and see if that frees up some memory and lets Gradle compile.

rsmith6
  • 81
  • 5
  • 2
    I have more than 5gb ram left for Android Studio. So that's probably not the problem here – Eknoes Jun 15 '15 at 19:25