window 搭建 Flutter for Android的环境

1.android studio安装Dart和flutter插件

android studio->file->Settings->Plugins

2.直接新建flutter 项目。然后自动下载需要的sdk。
3.完成!

验证环境配置是否成功:
打开:E:\app\fluttersdk\flutter\flutter的flutter_console.bat输入 flutter doctor 看一下是否都打勾了。



1.Flutter run:What went wrong: A problem occurred configuring root project ‘android’ 解决方案

连接超时:

 Connect to dl.google.com:443 [dl.google.com/216.58.221.238] failed: Connection timed out: connect

1.Android包下的google()改成以下代码;
2.E:\app\fluttersdk\flutter\flutter\packages\flutter_tools\gradle 目录下flutter.gardle包下的google()改成一下代码

// 这里导致报错,所以注释或删除掉即可。
    // 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'}

问题解决!!!!可喜可贺。

ref

入门: 在Windows上搭建Flutter开发环境

你可能感兴趣的:(Flutter,#,Flutter——实操,flutter)