Gradle wrapper download fails via http


(Akira KAWAGUCHI) #1

Hi there,

Recently, download of Gradle Wrapper via http (not https) fails with following messages:

$ ./gradlew tasks
Unzipping ...
Exception in thread "main" java.util.zip.ZipException: zip file is empty
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(ZipFile.java:219)
	at java.util.zip.ZipFile.<init>(ZipFile.java:149)
	at java.util.zip.ZipFile.<init>(ZipFile.java:163)
	at org.gradle.wrapper.Install.unzip(Install.java:215)
	at org.gradle.wrapper.Install.access$600(Install.java:27)
	at org.gradle.wrapper.Install$1.call(Install.java:75)
	at org.gradle.wrapper.Install$1.call(Install.java:48)
	at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
	at org.gradle.wrapper.Install.createDist(Install.java:48)
	at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
	at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)

gradlew.properties configuration is:

distributionUrl=http\://services.gradle.org/distributions/gradle-3.4-bin.zip

Only when changing wrapper configuration to use distributionUrl=https\://services.gradle.org/distributions/gradle-3.4-bin.zip it started working again.

I think this issue seems to be a similar problem to old this post.

Since I have developed many projects with http settings, I hope to succeed even via http.

Regards
Akira


(Mark Vieira) #2

Are you still seeing this error? This was due to a change we made to redirect HTTP to HTTPS which we’ve since reverted.


(Akira KAWAGUCHI) #3

It works now! Thank you for your response.