一、报错 google自行搜索
// 我的报错
buildscript {
# kotlin版本号过低
ext.kotlin_version = '1.3.21'
repositories {
google()
jcenter()
}
dependencies {
# gradle版本号过低
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
二、连接超时,jar包下载
//1.改变文件
C:\flutter\packages\flutter_tools\gradle\flutter.gradle
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' }
}
//2.改变 build.gradle中的文件
repositories {
// google()
// jcenter()
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' }
}
三、gradle版本问题