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
it was hard to solve but i did it look go to C:\Users(user name)
delete .gradle file its you didn't see it it may be in hidden files so if you use windows 7 right click then click on properties and click on hidden to be not checked
then the file will appear then delete it i hope this works
Resolution is simple. Open the "Android SDK Manager", update all packages and then restart your Android Studio. After that you project should compile without any issues.
Just ignore the error and try running the project anyway. It will fail, but this time you will get a link in the error description. Clicking the link will trigger the automatic update/download of the outdated/missing component.
In my scenario, the project failed to launch two times, each time another API/SDK component being the culprit.
In my case I was just trying to launch a sample project I downloaded, having no clue what API level was being targeted or where to look for this information.
Go to
file->settings->build,execution,deployment->gradle.
(and set gradle home path from your directory)
It is a very common issue and the solution is very easy... Just update the SDK in SDK manager(see full instructions below)
Thanks for asking that question :)
Download grade files from this url and extract all in a folder: https://gradle.org/releases
Open file -> Setting in windows OS or Preferences in mac OS and in "Build, Execution, Deployment"
Click on "Gradle"
Check “Use local cradle distribution” and give that extracted folder path.
Run gradle.bat for Windows OS and gradle file for mac OS in that folder.
Then check “Offline work”.
"your extracted folder path"/gradle-4.10.2/bin/.gradle (for version 4.1.2 you can set your version)
Press OK and enjoy it.