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.
相关问题
- Could not read entry … from cache taskArtifacts.bi
- Could not read entry … from cache taskArtifacts.bi
- Non-static method isGooglePlayServicesAvailable an
- Configure gradle plugin based on future tasks
- How to fix the error Cannot change strategy of con
相关文章
- Android BuildConfig Field generating String incorr
- Android virtual device manager crashes with “doubl
- What are the `^let` annotations in Android Studio
- Android Studio doesn't display logs by package
- Gradle Could not find method “() for arguments on
- Gradle Custom Plugin: gradleApi() vs Explicit Depe
- Advanced profiling is unavailable for the selected
- Android Studio 3.5 ERROR: Unable to resolve depend
It could be that you are using gradle in offline mode. To uncheck it go to
File > Settings > Gradle
, uncheck theOffline Work
checkbox, and clickApply
Make sure you have internet connection and sync the project again.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 case, 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.
If your got timeout, Check
Gradle Scripts -> gradle.properties
in Android Studio, I found that I do have set asocket
proxy in Android Studio settings, but in thisgradle.properties
file, my proxy became tohttp
, so I just removed thishttp proxy setting
lines, and finally works.it looks different from one situation to another. for me i did an installation and update a lot of things that the sdk manager said to then i had this problem. all i did was: from file -> Invalidate caches/Restart (a dialog will pop-up) choose Invalidate and restart.
after the restart is done. everything was fixed but i needed to create a new emulator and delete the old one. (android studio 1.3.1) (one professional must edit this to be more understandable) . . . Here everything was fine, but your machines also needs restart because some system files are changed, to sync them we have to restart the system.
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...
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