Error running android: Gradle project sync failed. Please fix your project and try again

SePröbläm picture SePröbläm · Apr 22, 2015 · Viewed 337.7k times · Source

Android Studio (1.2 RC0) keeps telling me Error running android: Gradle project sync failed. Please fix your project and try again. How can I find out what the problem is? Unfortunately the solutions from this SO thread did not help.

Answer

toha picture toha · Aug 13, 2016
  1. Goto File -> Invalidate caches / Restart
  2. Shutdown Android Studio
  3. Rename/remove .gradle folder in the user home directory
  4. Restart Android Studio (It will download gradle metadata and data)
  5. Gradle build succeed
  6. Rebuild project. Done.