Skip to content

Instantly share code, notes, and snippets.

@andhikayuana
Created October 17, 2019 04:50
Show Gist options
  • Save andhikayuana/f8e29e51a564d3c4c32124e5836bf772 to your computer and use it in GitHub Desktop.
Save andhikayuana/f8e29e51a564d3c4c32124e5836bf772 to your computer and use it in GitHub Desktop.
Flutter Gradle Timeout Issue

step 1 :

make sure you have correctly installed gradle by locating the zip file inside .grade/dist

or

more simpler way is by running choco install gradle for windows or brew install gradle for mac (choco is package manager for Windows https://chocolatey.org/ )

step 2

in yourFlutterAppDir/android/gradle/wrapper/gradle-wrapper.properties file change the distributionUrl to https://services.gradle.org/distributions/gradle-YOUR_LOCAL_VERSION-all.zip mine is distributionUrl=https://services.gradle.org/distributions/gradle-5.0-all.zip

if you got Cannot lock task history cache (APP_NAME\android.gradle\5.0\taskHistory) as it has already been locked by this process.

you may need to clear the cache by removing the .gradle\caches folder

-For Windows it's under C:\Users\YOUR_USER_NAME.gradle\caches

-For Mac OSX it's ~/.gradle/caches execute the following command: find ~/.gradle -type f -name "*.lock" | while read f; do rm $f; done after clearing the cache , run the app again and be patient

end result 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment