'Exception in thread "main" java.util.zip.ZipException: error in opening zip file When testing the application
In Android Studio the application was running on Real device, it was exported in ABK format .. But after a while, this error appears I read about gradle but didn't understand exactly which file to delete and replace
--- the error: Exception in thread "main" java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:225) at java.util.zip.ZipFile.(ZipFile.java:155) at java.util.zip.ZipFile.(ZipFile.java:169) at org.gradle.wrapper.Install.unzip(Install.java:214) at org.gradle.wrapper.Install.access$600(Install.java:27) at org.gradle.wrapper.Install$1.call(Install.java:74) at org.gradle.wrapper.Install$1.call(Install.java:48) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) at org.gradle.wrapper.Install.createDist(Install.java:48) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)emphasized text [!] Gradle threw an error while trying to update itself. Retrying the update...
How can I fix that. Use the Android Studio release 3.6.1 .. flutter .. dart .. Windows
Solution 1:[1]
This error is usually thrown when the gradle build that you're using is corrupted. To solve this issue, you can try modifying the gradle version that you're using. Look for gradle version that could work with your build on this page, and update gradle distributionUrl defined in gradle-wrapper.properties located on /android/gradle/wrapper
. Then rebuild the Flutter project again with flutter clean
and flutter pub get
Solution 2:[2]
try running it with sudo, if that works then it means you have a problem with permission, change the owner of the flutter folder from root to you.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Omatt |
Solution 2 | Preye |