1

well i installed android studio and using developer mode and usb debugging i tried to run my project on my phone but after few minutes of waiting this error appear in android studio:

Exception in thread "main" java.util.zip.ZipException: zip END header not found
    at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1607)
    at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1497)
    at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1504)
    at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1308)
    at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1271)
    at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:733)
    at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:850)
    at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:248)
    at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:177)
    at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:191)
    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)

i want run my project but this error appear,i tried deleting my flutter sdk and reinstalling it but that didnt do the trick and i still get this error

pooria rm
  • 11
  • 3

1 Answers1

1

The error is related to Gradle, this is usually due to a corrupt or incomplete Gradle setup. To resolve it, Go to the user root directory and locate the hidden .gradle folder and delete it. If you're on a mac, open the terminal and execute

cd ~
rm -rf .gradle

and then run your app connected to an Android emulator or device, don't cancel, and make sure to have a stable internet connection, this will download fresh Gradle.