Android Studio First pit Gradle sync Failed:Cause:error in opening zip file error

Source: Internet
Author: User

Preface

This article is mainly through the introduction if the Android Studio installed when the solution of the package errors and ideas, the award of the Mermaid than the grant of fish.

Environment:
    • Operating system: Windows 7 SP1
    • Android Build Environment: Android Studio 2.3.1
    • jdk:jdk1.8.0_102
Error:

Gradle sync Failed:Cause:error in opening zip file

Consult IDE Log for + details (Help | Show Log)

Experience:

1. Try to reload with the Sync Project with Gradle Files.

(Figure 1:sync Project with Gradle Files operation steps)

The problem of x error is still unresolved. At this time I am considering whether because of the download plug-in problems, so gradle actually not completed it? The problem with this zip decompression actually happened in IntelliJ idea too.

2. Confirm what version of the project created by the current Android studio 2.3.1 is using Gradle

(Figure 2: Modify how the catalog is displayed)

(Figure 3: Find the Gradle directory in your project)

(Figure 4: Locate the Gradle-wrapper.properties file and open it)

(Figure 5: Locate the Distributionurl configuration node for the Gradle version)

The ultimate goal is to:

Copy to browser download: Https://services.gradle.org/distributions/gradle-3.3-all.zip

3. Open the C:\Users\Administrator directory

(Figure 6: Find the. Gradle directory)

Open C:\Users\Administrator\.gradle\wrapper\dists\gradle-3.3-all\55gk2rcmfc6p2dg9u9ohc3hw9

Found inside only the two files shown, and then found the manual decompression Gradle-3.3-all.zip failed. 7 is shown

(Fig. 7)

Here basically can be confirmed because the Gradle-3.3-all.zip download is incomplete and caused.

Copy the Gradle-3.3-all.zip that we previously downloaded independently from the browser to C:\Users\Administrator\.gradle\wrapper\dists\gradle-3.3-all\ 55gk2rcmfc6p2dg9u9ohc3hw9

Restart the project to open Android Studio.

Solution Summary:

1. Download Https://services.gradle.org/distributions/gradle-3.3-all.zip

2. Open C:\Users\Administrator\.gradle\wrapper\dists\gradle-3.3-all\55gk2rcmfc6p2dg9u9ohc3hw9

3. Replace the downloaded Gradle-3.3-all.zip to C:\Users\Administrator\.gradle\wrapper\dists\gradle-3.3-all\ 55gk2rcmfc6p2dg9u9ohc3hw9\gradle-3.3-all.zip

4. Restart the Android Studio project

final correct directory:

(Figure 8: Install the correct directory structure)

Android Studio First pit Gradle sync Failed:Cause:error in opening zip file error

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.