Windows下搭建Flutter开发环境
作者:武器大师72 时间:2023-11-06 01:32:52
前言
从来没接触过flutter,我将在这里记录下我的flutter学习踩坑历程。
安装
就从安装开始叭,官网链接在此。先遵照官网教程来叭。
系统要求
文档记录了系统要求:
操作系统 Windows 7 SP1 or later (64-bit), x86-64 based.
磁盘空间1.64G以上(不包含工具和IDE)
工具:
Windows PowerShell 5.0 或者更新的版本,(windows10自带)
git windows版2.X以上,确保配置过环境变量,在powershell里面可以调用,如下图:
下载安装
所有版本列表:https://flutter.dev/docs/development/tools/sdk/releases
这里我选择了最新的稳定版2.5.3
下载后解压到自己想安装的地方,我解压到了D盘
把flutter/bin
添加到环境变量,重启
电脑。
运行命令验证一下,如下图能够定位到flutter
目录即为安装成功
运行flutter doctor
自动检测你电脑上装的环境,检测完毕后会输出报告,需要安装的软件或者工具会以加粗字体显示。
安装Android Studio
官网下载,一路next
安装完成,启动后打开Setting–>sdk
,可以管理sdk
和工具的版本。flutter doctor
会告诉你需要安装那些sdk
和tools
,安装完以后再用flutter doctor
检测一下。用Android Studio
新建Flutter
项目需要先安装Flutter
和Dart
插件,Setting–>plugin
安装即可。
成功
经过一番折腾,终于doctor
再次检测的时候,没有问题了。
资源问题
一些依赖不好下载,可以在项目里面切换,也可以sdk安装目录全局更改,如图在下面的文件里面添加阿里云的地址即可。
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
mavenLocal()
mavenCentral()
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
}
}
android {
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
来源:https://blog.csdn.net/qq_18454025/article/details/121161201
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
JavaEE中用response向客户端输出中文数据乱码问题分析
![](https://img.aspxhome.com/file/2023/8/122978_0s.png)
Java异常学习之自定义异常详解
![](https://img.aspxhome.com/file/2023/7/83157_0s.jpg)
Spring整合Quartz实现动态定时器的示例代码
![](https://img.aspxhome.com/file/2023/5/96115_0s.png)
Java实现在线SQL编程最新完整版
SpringBoot多数据源配置详细教程(JdbcTemplate、mybatis)
c# 单例模式的实现方法
Android水波纹载入控件CircleWaterWaveView使用详解
![](https://img.aspxhome.com/file/2023/7/129047_0s.gif)
Android中的广播和广播接收器代码实例
自定义AlertDialog去除黑色背景的解决方法
![](https://img.aspxhome.com/file/2023/4/137694_0s.jpg)
Android自定义View实现通讯录字母索引(仿微信通讯录)
![](https://img.aspxhome.com/file/2023/5/118965_0s.png)
桌面浮动窗口(类似恶意广告)的实现详解
java Springboot实现多文件上传功能
Android Studio 多层级 Module 对 aar 引用问题解决方法
![](https://img.aspxhome.com/file/2023/2/86762_0s.png)
Java web的读取Excel简单实例代码
![](https://img.aspxhome.com/file/2023/6/78946_0s.png)
C#访问C++动态分配的数组指针(实例讲解)
SpringBoot应用部署于外置Tomcat容器的方法
![](https://img.aspxhome.com/file/2023/6/119146_0s.jpg)
C#数据绑定(DataBinding)简单实现方法
如何利用JAVA实现走迷宫程序
![](https://img.aspxhome.com/file/2023/3/62983_0s.png)
C# 如何使用ajax请求
使用IntelliJ IDEA 15和Maven创建Java Web项目(图文)
![](https://img.aspxhome.com/file/2023/1/101941_0s.png)