Flutter Resolving dependencies...很慢解决办法

因为项目原因最近一直没有学习flutter了,今天打开以前的flutter项目时发现,flutter Resolving dependencies…很慢。
解决办法:
打开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 'http://maven.aliyun.com/nexus/content/groups/public'}
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
    }
}

即可解决!

Android Studio 搭建Flutter之后,AS链接不上真机或者虚拟机,解决办法:配置Android SDK环境变量

package get 慢

可以配置一下临时镜像(Mac)

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

windows 则是新建两个环境变量:PUB_HOSTED_URL、FLUTTER_STORAGE_BASE_URL。值为后面的地址,即可

    原文作者:北有花开
    原文地址: https://www.jianshu.com/p/31e5800e18d9
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞