After updating android studio to 3.0 and switching to gradle plugin 3.0.0
I am getting this error:
Gradle '...' project refresh failed
Error:Unexpected end of ZLIB input stream
The problems appears both in all my old projects but brand new ones as well. Any Idea on what is causing this? Gradle 2.3.3 works fine
my project build.gradle
:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.1.51'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And the gradle-wrapper.properties
:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
Any help would be appreciated!
I had the same problem after my studio upgraded from 2.3.3 to 3.0, of course I have upgraded my project gradle plugin version from 2.3.3 to 3.0.
I think the gradle plugin jar file is broken and not readable or any unknow exception happened, so delete it and re-download.
What I propose is to,
If the problem is not solved, try to delete your gradle user data (mine is C:\Users\tea\.gradle) and then re-sync project.