flutter 启动时一直Resolving dependencies...

原因:国内网无法从Google获取资源,貌似搭了梯子也没用

修改flutter sdk Path/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.3.2'
    }
}

 

转载于:https://www.cnblogs.com/Zhusi/p/11538207.html

你可能感兴趣的:(java,移动开发,开发工具)