Before marking this as duplicate.I tried this as well as this . I am using JDK 19 and gradle 7.6.1 for my project.
Downloading https://toolsproxy.tools.tsys.aws/repository/gradle/distributions/gradle-7.6-bin.zip
...........10%.....
Could not unzip /Users/apunamiya/.gradle/wrapper/dists/gradle-7.6-bin/4d7jnayiwkxx9wuev16n357bl/gradle-7.6-bin.zip to /Users/apunamiya/.gradle/wrapper/dists/gradle-7.6-bin/4d7jnayiwkxx9wuev16n357bl.
Reason: zip END header not found
Exception in thread "main" java.util.zip.ZipException: zip END header not found
at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1483)
at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1491)
at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1329)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1292)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:710)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:243)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:172)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:186)
at org.gradle.wrapper.Install.unzip(Install.java:250)
at org.gradle.wrapper.Install.access$900(Install.java:42)
at org.gradle.wrapper.Install$1.call(Install.java:96)
at org.gradle.wrapper.Install$1.call(Install.java:63)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
at org.gradle.wrapper.Install.createDist(Install.java:63)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
What should I try or am i doing something wrong?
I am able to download the zip file from the URL which is getting used to download the gradle zip when i run the ./gradlew --version command. Not sure where I am going wrong.
I also tried running the command after deleting the .gradle folder , dists/gradle-7.6-bin , but still getting the same error
UPDATE: Tried switching my network, I am still getting the below on IntelliJ IDE Build error on IntelliJ IDE - Cause-zip END header not found