Error: Failed to open zip file. Gradle & #39; s dependency cache may be uploaded upt (this sometimes occurs after a network connection timeout.), gradledependency

Source: Internet
Author: User

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 !!!

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.