Flutter

配置路径

export PATH=/Users/weihaizhou/flutter/bin:$PATH 

镜像代理

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

打开bash_profile

open -e .bash_profile

更新配置

source .bash_profile

运行

flutter doctor

buildscript {
    repositories {
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        mavenCentral()
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
    }
}

allprojects {
    repositories {
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        mavenCentral()
        google()
        jcenter()
    }
}

需要注意的地方:

根目录下的build.gradle中指定的android studio中的gradle插件版本是否已下载,是否已android studio版本一致。并且Flutter SDK路径(flutter\packages\flutter_tools\gradle)中的flutter.gradle文件中gradle版本也确保一致。
https://blog.csdn.net/qq_31017737/article/details/83008468

你可能感兴趣的:(Flutter)