I’m facing problem in flutter setup on android studio. how to resolve this problem ?
anyone have faced this problem plz help me out.
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.Insta`enter code here`ll.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
2
Answers
Check if your ‘JAVA_HOME’ path variable is set and you have installed Java correctly.
I recently faced this kind of issue. All I did was delete the .gradle folder from C:Users<youraccount> . Try rerunning after deleting that and it will build it again.
After that maybe you will face issues in your app/gradle file in android folder in the project. If you open that, there may be errors of
GradleException
which you have to replace withFilenotFoundException
Also, do run
flutter doctor
to know about any issues present in your setup.Please do let me know if it works for you.