Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle gets stuck at either 'build' or 'assembleDebug' when using the 64bit or 32bit version of Android Studio

The issue I've had over the past few months is that Android Studio would often get stuck on Gradle: build, as seen here. Android Studio itself would stay responsive but the build simply wouldn't progress. It also never generates any kind of error, so I can't really post any useful information. Once in a blue moon it might suddenly work, but nothing reliable.

Recently I found a post here on Stack Overflow where someone's Android Studio would get stuck on Gradle: build when he tried to create a new project, and he noticed that this issue didn't exist in the 32-bit version of Android. So I thought, why not try that. Turns out that building isn't an issue anymore, but assembleDebug is, when trying to build the application. As can be seen here.

Of course all these commands work flawlessly when run using command prompt and gradlew.

What I've tried so far:

  • Reinstalling Android Studio (including the removal of .AndroidStudioProject)
  • Upgrading Android Studio to the latest version
  • Removing any build files from projects
  • Creating completely new projects in Android Studio
  • Switching from 64-bit to 32-bit Android Studio

I'm running the latest version of Android Studio, using version 19.1.0 of the build tools, gradle v0.11+ and am on Windows 8.1.

Is there anything else I can try? This is starting to become seriously annoying. The last possible solution I can come up with is just doing a complete format and a fresh Windows installation.

like image 832
fdorssers Avatar asked Jun 21 '14 20:06

fdorssers


1 Answers

I was experiencing the same problem, and the solution was very unexpected in my case: AVAST antivirus was somehow interfering with the Gradle:build process. Deactivating this antivirus solved the problem!

like image 112
Miguel Ángel Oviedo Avatar answered Sep 22 '22 13:09

Miguel Ángel Oviedo