Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle Build gets stuck at Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources]

I am running Android Studio 1.3.2 on Ubuntu 14.04, with build-tools version 23.0.0.

Whenever I load any project, after the indexing is complete, Gradle shows Gradle Build Running and no matter how long I leave it, it shows no progress or errors.

I have tried these solutions:

  • How to fix Android Studio getting stuck executing Gradle tasks?
  • Gradle gets stuck at either 'build' or 'assembleDebug' when using the 64bit or 32bit version of Android Studio
  • Gradle Build stuck at generate debug sources

But they do not work for me.

Any more solutions? Help will be greatly appreciated

like image 221
Anuraag Baishya Avatar asked Sep 02 '15 18:09

Anuraag Baishya


1 Answers

I managed to solve the problem after a lot of trial and error.

  • Firstly I changed the build-tools version to 22.0.1. I know this is an outdated version, but it worked for me.
  • After that, Gradle build finished with an aapt error, for which I installed the following.

sudo apt-get install lib32stdc++6 sudo apt-get install lib32z1

These solved the problem for me.

like image 145
Anuraag Baishya Avatar answered Nov 15 '22 10:11

Anuraag Baishya