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

分类: Flutter

因为项目原因最近一直没有学习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。值为后面的地址,即可

 

标签: flutter

上一篇: 没有了

下一篇: pod setup命令失败解决方法

by 2019-09-20 14:13:14

0 条评论