0

I'm working with Android Studio for the first time and when building a project Gradle just takes forever (Ubuntu 15.10, Android Studio 1.5.1, javac 1.7.0.80).

Suspecting I did something wrong, I did the following already 3 times to no avail:

Log off after 15 mins because Gradle just hangs, and Studio will no respond to the Exit menu option (it responds to other menu options such as About). All this time, the message "Gradle Build Running" appears, the wheel keeps spinning and the time counter increments every minute.

Any ideas what's wrong?

Addendum:

Per suggestion of T.Lulius I added the gradle.properties as explained in the link. This didn;t work. Then I also marked the other boxes mentioned in the link.
Result is the same :-(

When I click on Build he following happens: Build starts, at the bottom of the screen you get the build status:

  • Executing tasks:[:app:assembleDebug] | Gradle build running |1 process running | 3:1
  • 10 mins later it was still the same so I returned half an hour later
  • 2 hours later the status bar has remained the same.

This is getting frustrating. One would suppose that the out of the box version of Studio would at least work :-(

What am I missing?

Thanks!

kxtronic
  • 331
  • 5
  • 16

1 Answers1

1

Try updating your gradle.properties like it says on this link.

Community
  • 1
  • 1
  • Hi T, I did as suggested, but no results. Please see addendum to the question above – kxtronic Feb 05 '16 at 15:07
  • Is it the first time that happens to you? Try update the android studio or delete and reinstal the latest version. –  Feb 05 '16 at 19:33
  • Ok, I removed all from Android, android-studio, .gradle, Java 7 from laptop. Then I installed Java 8, and reinstalled android studio. Now when creating a project studio fails with the following error:Error:(23, 17) Failed to resolve: junit:junit:4.12 – kxtronic Feb 06 '16 at 07:06
  • try this: [Link](http://stackoverflow.com/questions/32519219/error23-17-failed-to-resolve-junitjunit4-12) to resolve the error. –  Feb 06 '16 at 10:37
  • Now it works! Removing the line containing junit:junit:4.12 did the trick. Question: what is junit for? Will I miss soemthing later on? – kxtronic Feb 06 '16 at 12:26
  • Finally after everything was working, I created gradle.properties as indicated in the link above. Now the build time went from, 1min40sec to 18sec. Cool! – kxtronic Feb 06 '16 at 13:09