1 flutter项目的android目录中,项目的build.gradle
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/nexus/content/groups/public'}
google()
mavenCentral()
2.flutter的sdk中进行设置,处于此目录下C:\fluttersdk\packages\flutter_tools\gradle\flutter.gradle
...
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/nexus/content/groups/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
}
}
...
3 flutter的sdk中进行设置,处于此目录下
C:\fluttersdk\packages\flutter_tools\gradle\resolve_dependencies.gradle,文章来源:https://www.toymoban.com/news/detail-528371.html
...
repositories {
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/nexus/content/groups/public' }
maven {
url "https://storage.flutter-io.cn/download.flutter.io"
}
}
...
文章来源地址https://www.toymoban.com/news/detail-528371.html
到了这里,关于Flutter 卡在 Running Gradle task ‘assembleDebug‘... 的解决方法的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!