Flutter 卡在 Running Gradle task ‘assembleDebug‘... 的解决方法

Posted 早起的年轻人

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Flutter 卡在 Running Gradle task ‘assembleDebug‘... 的解决方法相关的知识,希望对你有一定的参考价值。

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,

...
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"
       



...

以上是关于Flutter 卡在 Running Gradle task ‘assembleDebug‘... 的解决方法的主要内容,如果未能解决你的问题,请参考以下文章

Flutter编译卡在Running Gradle task ‘assembleDebug‘

Flutter App 卡在“app running gradle task 'assembledebug ...”

flutter run卡在Running Gradle task 'assembleDebug'...

解决Flutter升级后,flutter run 卡在gradle build running的问题

Flutter 卡在 Running Gradle task ‘assembleDebug‘... 的解决方法

Flutter 卡在 Running Gradle task ‘assembleDebug‘... 的解决方法