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 th
Delete "build" folder from project's root folder. Then do "invalidate cache and restart". This will restart your Android Studio and then build the app again, will solve the issue.
If your got timeout, Check Gradle Scripts -> gradle.properties
in Android Studio, I found that I do have set a socket
proxy in Android Studio settings, but in this gradle.properties
file, my proxy became to http
, so I just removed this http proxy setting
lines, and finally works.
Apparently, some platforms could be missing. This is how I solved the problem:
Do you see an error message that is shown at the bottom of your Android Studio window? It could be a smaller window on the bottom right also.., which looks like:
Now, Click on that blue link, do as the dialog boxes say (if any)...
That solved the problem. Hope it helps...
if you have this failure and have other failures too, like "Unsupported Modules Detected: Compilation is not supported for following modules” maybe you need to solve them first and then it will be solved too. that's what happened to me.
Goto File -> Invalidate caches / Restart Shutdown Android Studio Rename/remove .gradle folder in the user home directory Restart Android Studio (It will download gradle metadata and data) Gradle build succeed Rebuild project. Done
If no error messages are shown: sometimes the command-line gradle shows them. Just go the the command-line, change to the app
directory and type
gradle installDebug
or, if the details are missing
gradle --info installDebug
This can provide additional information how to debug the problem.