1、挂VPN
2、换源
1 repositories { 2 // google() 3 // jcenter() 4 maven { url 'https://maven.aliyun.com/repository/google' } 5 maven { url 'https://maven.aliyun.com/repository/jcenter' } 6 maven { url 'http://maven.aliyun.com/nexus/content/groups/public'} 7 8 maven { url "https://storage.googleapis.com/download.flutter.io" } 9 } 10 11 allprojects { 12 repositories { 13 // google() 14 // jcenter() 15 maven { url 'https://maven.aliyun.com/repository/google' } 16 maven { url 'https://maven.aliyun.com/repository/jcenter' } 17 maven { url 'http://maven.aliyun.com/nexus/content/groups/public'} 18 }
1 maven{ url 'https://maven.aliyun.com/repository/google' } 2 maven{ url 'https://maven.aliyun.com/repository/jcenter' } 3 maven{ url 'http://maven.aliyun.com/nexus/content/groups/public' }
这样就配置好了,可以跑了。。。。。
如果你发现:连接超时
Could not resolve io.flutter SmallStars 12:34:48 Could not resolve io.flutter:x86_64_debug:1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32. > Could not get resource 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_64_debug/1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32/x86_64_debug-1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32.pom'. > Could not GET 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_64_debug/1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32/x86_64_debug-1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32.pom'. > Connect to storage.googleapis.com:443 [storage.googleapis.com/172.217.160.80] failed: Connection timed out: connect > Could not resolve io.flutter:x86_64_debug:1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32. > Could not get resource 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_64_debug/1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32/x86_64_debug-1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32.pom'. > Could not GET 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_64_debug/1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32/x86_64_debug-1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32.pom'. > Connect to storage.googleapis.com:443 [storage.googleapis.com/172.217.160.80] failed: Read timed out
private static final String MAVEN_REPO = "https://storage.flutter-io.cn/download.flutter.io";
maven { url "https://storage.flutter-io.cn/download.flutter.io" }