2

I can't run or debug start a Flutter project in Android Emulator. Even if android emulator works normally, when I run the project the editor always gives me this error:

 Running Gradle task 'assembleDebug'...
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)
Exception: Gradle task assembleDebug failed with exit code 1

My MAC is 2020 MacBook Pro with M1 chip, my system is Ventura 3.0.1 and Flutter 3.3.8. This problem was there before upgrading MacOS to Ventura.

2 Answers 2

1

Select ARM Images section in System Image while creating a new Android Device.
As seen below: enter image description here

Sign up to request clarification or add additional context in comments.

Comments

0

You need to rebuild your .gradle file.

For macOS:

cd ~
rm -rf .gradle

Github Issue

1 Comment

Still gives me same error

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.