需要修改flutter.gradle文件中的配置
这个文件的存储位置:
/flutter/packages/flutter_tools/gradle/flutter.gradle
修改buildscript下的repositories。改为国内镜像即可。
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/public' } //public
maven { url 'https://maven.aliyun.com/repository/google' } //google
maven { url 'https://maven.aliyun.com/repository/gradle-plugin'} //gradle
maven { url 'https://maven.aliyun.com/repository/central' } //central
maven { url 'https://maven.aliyun.com/repository/jcenter' } //jcenter
}
}
网友评论