Flutter Initializing Gradle 问题

非常狗屎

报错提示是这样:

ProcessException: ProcessException: Process "/Users/bigzhu/FlutterProjects/english_buoy/android/gradlew" exited abnormally:
Exception in thread "main" java.lang.RuntimeException: Timeout of 120000 reached waiting for exclusive access to file: /Users/bigzhu/.gradle/wrapper/dists/gradle-4.10.2-all/9fahxiiecdb76a5g3aw9oi8rv/gradle-4.10.2-all.zip
	at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:61)
	at org.gradle.wrapper.Install.createDist(Install.java:48)
	at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
	at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
  Command: /Users/bigzhu/FlutterProjects/english_buoy/android/gradlew -v

网上所有的对 gradle 加 proxy, 或者改为阿里镜像的方法一概没有作用

查看项目目录下 android/gradle/wrapper/

看到这句: distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip

拿到了下载地址是 https://services.gradle.org/distributions/gradle-4.10.2-all.zip

进入 : /Users/bigzhu/.gradle/wrapper/dists/gradle-4.10.2-all/9fahxiiecdb76a5g3aw9oi8rv/ 目录, 直接把

wget https\://services.gradle.org/distributions/gradle-4.10.2-all.zip

重新启动, 搞定了