Flutter 一直 Running Gradle task ‘assembleDebug‘...

1  在 /android/build.gradle 文件中

//...
buildscript {
    repositories {
        //google()
        //jcenter()
        maven { url 'https://maven.aliyun.com/repository/google' }
        maven { url 'https://maven.aliyun.com/repository/jcenter' }
        maven { url 'https://maven.aliyun.com/repository/public' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
    }
}

allprojects {
    repositories {
        //google()
        //jcenter()
        maven { url 'https://maven.aliyun.com/repository/google' }
        maven { url 'https://maven.aliyun.com/repository/jcenter' }
        maven { url 'https://maven.aliyun.com/repository/public' }
    }
}

2 flutter sdk目录,进入如下目录 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 'https://maven.aliyun.com/repository/public' }
     }
     dependencies {
         classpath 'com.android.tools.build:gradle:3.5.3'
     }
 }
//...

3  最近也是在写demo ,亲测可用记录一下,查了其他人的一些操作,大部分也是这么操作的 完成上述操作后 运行即可,剩下的就交给网速吧,有条件的就翻一下

4  dart sdk 顺便记录一下,  flutter_windows_1.17.5-stable.zip  ,我的下载

5 flutter 创建项目名称 只能为小写

你可能感兴趣的:(Flutter,dart,sdk)