Failed to send crash report due to a network error: SocketException: OS Error: 信号灯超时时间已到 , errno = 121, address = clients2.google.com, port = 55220
flutter run 时出现上面的错误
需要修改两个地方
build.gradle文件内修改成国内镜像
buildscript {
repositories {
maven{ url 'https://maven.aliyun.com/repository/google' }
maven{ url 'https://maven.aliyun.com/repository/jcenter' }
maven{url 'http://maven.aliyun.com/nexus/content/groups/public'}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
allprojects {
repositories {
maven{ url 'https://maven.aliyun.com/repository/google' }
maven{ url 'https://maven.aliyun.com/repository/jcenter' }
maven{url 'http://maven.aliyun.com/nexus/content/groups/public'}
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
另一个文件需要下载好压缩包到本地然后应用路径修改为自己的路径
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
改为
distributionUrl=file:///D:/Android/gradle-4.10.2-all.zip
再次flutter run 正常