解决Flutter无法下载依赖

修改flutterSKD中的flutter.gradle文件

//文件路径在FlutterSDK中的\packages\flutter_tools\gradle文件夹中
修改repositories为
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' }
}

修改android项目的build.gradle文件

repositories {
//  google()
//  center()
    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' }
}

重新编译

Copyright: 采用 知识共享署名4.0 国际许可协议进行许可

Links: https://blog.ooimi.com/archives/解决flutter无法下载依赖