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