问题
I got some problems with my Android Studio (0.8.9). When i want to create a new project, debug it or whatever, there just appears a error message like:
Gradle 'Afsddsf' project refresh failed
Error:Cause: error reading zip file
in the top it shows:
gradle project sync failed. basic functionality will not work properly
I already have the zip-Folder in my .gradle-File. I found a lot of errors here in google about opening the zip-file. but noone of these matched to my error. I also installed all of the SDK's and so on.
Also tried to set up the gradlesettings in this project and choosed the local gradle, but also didn't work. maybe it helps to say, that also my "handyvieweremulator", which was normally shown in the beginning on the right side of the programm, won't work. he has some referending problems. i'm gonna post my errorlog this evening, if this is gonna help too.
Thanks for any help ...
回答1:
I had the same problem, here's how it solved it:
(tested on Android Studio under OSX 10.10.5)
Preferences --> Build, Execution, Deployment --> Build Tools --> Gradle
Then check Offline work.
This will use your local gradle distribution and will recreate the zip file when you sync Gradle or Run the project.
Hope this helps.
回答2:
Like VVZen said that, i followed
File --> Settings --> Build, Execution, Deployment --> Build Tools --> Gradle
and i checked 'Offline work' option.
Additional, i followed below steps that;
File --> Invalidate Caches / Restart --> Invalidate and Restart.
After above steps, that problem was resolved for me.
回答3:
I think you should delete files inside the .gradle file of the project and restart the studio. as It works for me.
来源:https://stackoverflow.com/questions/26452521/android-studio-gradle-error-reading-zip-file