0

For Start I'm in a sanctioned country so I cannot run flutter without a VPN.
My system is Mac BigSur and I'm facing the problem below

As soon as I call flutter run in the command line, I see this error

Exception in thread "main" java.util.zip.ZipException: zip END header not found
        at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1581)
        at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1476)
        at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1483)
        at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1288)
        at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1251)
        at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:732)
        at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:849)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:247)
        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)
Running Gradle task 'assembleDebug'...                           1,023ms
Exception: Gradle task assembleDebug failed with exit code.

How can I solve this.

joseph smith
  • 143
  • 1
  • 10
  • 1
    This may help you https://stackoverflow.com/questions/52411697/intellij-compilation-error-zip-end-header-not-found – Diwyansh Jan 07 '22 at 17:16

1 Answers1

0

Probably this error is related to the gradle either corrupt it or incomplete gradle setup.

Use this command on your terminal

cd ~
rm -rf .gradle
Noyon
  • 97
  • 8
  • 1
    Your answer could be improved by adding more information on what these commands do and how it helps the OP. – Tyler2P Jan 07 '22 at 18:30