Error: Failed to open zip file. Gradle's dependency cache may be uploaded upt (this sometimes occurs after a network connection timeout.), gradledependency
At the beginning of my blog writing, it may be a bit incoherent. Please forgive me ....
Let's talk about the reasons for the image below.
Students, is it a little tricky to see this? Don't be afraid. Let's talk about the cause of this problem today.
Today, when I imported a demo in AS (AndroidStudio), this error was reported. At that time, I was very blind because I had never encountered it before, so I checked a lot of information online, various Baidu, the result shows that the problem is caused by gradle.
But I have checked this carefully, including I replaced gradle during import, and I replaced the second file in the gradle folder in the AS project, the gradle issue does not occur normally.
When I checked the information online, I suddenly thought that there would be a problem with the AS settings. So I read the AS settings page again.
Search for gradle on the settings page and check the steps.
It turns out that I didn't select it in step 3. In this case, you only need to select Use Local gradle distribution.
Of course, this is why I removed this check box for demonstration purposes. Normally, no path is available for the first time you choose. In this case, you need to select the path yourself.
When I select this path, the selected version is the same as the gradle version of my current demo. I don't know what problems will happen if they are inconsistent, that is, they are consistent.
After you select the correct path, the AS will automatically compile and the demo will be ready to run .......
I have also encountered the red "J" "symbol in all class files after the demo is imported, and the build is displayed when the demo is imported. the maven compilation in gradle is not successful. I will post on my blog later.
Certificate -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
If it helps students! Remember to pay attention to my new employee!
Reprinted, please specify the source !!!