Flutter: Could not determine the dependencies of task
发布时间:2022-05-25 17:48 星期三
当你遇到这个问题的时候,不用想,肯定是镜像问题,导致gradle包下载不下来,这时候只需要更换moven包为国内的即可。
解决方案如下:
修改文件:app/android/build.gradle
buildscript {
ext.kotlin_version = '1.3.50'
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' }
maven { url 'http://download.flutter.io'}
}
allprojects {
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' }
}
}
修改完阿里镜像还是这个错误呢