flutter Running Gradle task 'assembleDebug'

flutter 项目,运行就卡住了

1.修改项目中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'}
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

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' }
         maven {url 'http://download.flutter.io'}
    }
}
2.修改Flutter的配置文件, 该文件在Flutter安装目录/packages/flutter_tools/gradle/flutter.gradle
buildscript {
    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' }
 
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
    }
}

重点

2020-08-25 晚上回家按照上面的方法不行,也只一直卡起的,2020-08-26上午到公司,重新Run好了。百思不得其解!! 在观察观察。。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。