1.修改项目build.gradle
buildscript {
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' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
}
}
2.修改flutter sdk 里 flutter.gradle
参考路径:C:\flutter_windows_1.17.1-stable\flutter\packages\flutter_tools\gradle
buildscript {
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' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
}
}