user3259937
user3259937

Reputation: 567

Gradle Sync wont finish after 0.4.6 upgrade

After I upgraded my Android Studio to 0.4.6, it seems to get stuck with Gradle Sync. The yellow ribbon is persistently present on the top that says "Gradle Project Synch in Progress". However, there is no indication of any process running from the bar at the bottom.

When I try to run my application, it fails with "Gradle Project Sync Failed. Please fix your project and try again" message that appears in a balloon. However, there are no more information.

I was working on this project successfully before I upgraded to 0.4.6. And since 0.4.6 was updated quickly (within 5 days) from 0.4.5 to fix some gradle related bug, I am starting to wonder if this is something new they introduced.

Upvotes: 9

Views: 3831

Answers (3)

Michael
Michael

Reputation: 9904

Had the same problem

Was messing with .gradle code and removed include ':app' from settings.gradle on accident

Upvotes: 0

vvbYWf0ugJOGNA3ACVxp
vvbYWf0ugJOGNA3ACVxp

Reputation: 1116

I had a similar issue:

  • sync message stuck
  • can't build/rebuild (failed to sync message)
  • settings.gradle file is empty - has content with external editor.

I've downloaded a cannery version 0.8.11 (problematic version 0.8.9) which fixed the issue (after reverting settings.gradle to the version control revision).

Upvotes: 0

xialin
xialin

Reputation: 7756

I just encountered the same problem this afternoon. I'm running on IntelliJ IDEA, should be similar.

What I did is:

  • remove local Gradle from the $PATH (I used to set GRADLE_HOME variable and it's a different version)
  • in build.gradle, change the classpath to

classpath 'com.android.tools.build:gradle:0.10.+'

  • click File > Invalidate Caches/Restart (you can also manually remove the cache at ~/Library/Caches/{yourIDEName} and restart the IDE)

After this, the "Gradle Project Sync in Progress..." disappear once completed the syncing and I'm able to run my project again.

Upvotes: 3

Related Questions