1.修改 flutter安装目录/packages/flutter_tools/gradle/resolve_dependencies.gradle 文件
// 大约在19行
repositories {
google()
jcenter()
maven {
// 修改处
// url "$storageUrl/download.flutter.io"
url "http://download.flutter.io"
}
}
2.修改 flutter/packages/flutter_tools/gradle/flutter.gradle 文件
// 修改处,大约在44行
// private static final String DEFAULT_MAVEN_HOST = "https://storage.googleapis.com";
private static final String DEFAULT_MAVEN_HOST = "https://storage.flutter-io.cn/download.flutter.io";
网友评论