当前位置:网站首页>Flutter 环境变量配置和flutter doctor中的错误解决
Flutter 环境变量配置和flutter doctor中的错误解决
2022-07-30 07:37:00 【深海呐】
一、环境变量
右键点击 我的电脑-属性:然后找到环境变量
1.Android的SDK不在C盘的话需要额外配这个到用户环境变量:
ANDROID_HOME
D:\AndroidSDK
2.然后在系统变量:Path 中添加一条这样的值
D:\Flutter\flutter\bin
这个值写flutter包解压的实际地址即可
3.在系统变量中添加两个镜像变量:
变量名:FLUTTER_STORAGE_BASE_URL 变量值:https://storage.flutter-io.cn
变量名:PUB_HOSTED_URL 变量值:https://pub.flutter-io.cn
二、flutter doctor 相关错误解决:
1.随便找个文件夹打开GIt命令行: 鼠标右键 Git Bash Here
2.运行命令:flutter doctor
先来解决找个问题:
Android toolchain - develop for Android devices (Android SDK version 31.0.0)
第一个X号解决:
在studio下载一下这个:cmdline-tools
这边尽量下载最新的,或者和我这边一样也可以,默认视图可能和截图不一致,勾选右下角的对勾即可切换成图中的视图样式
然后再运行flutter doctor, 咱们继续解决第二个问题:
Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
第二个X号解决:
运行命令 flutter doctor --android-licenses 然后根据提示一直回复 “y” 表示同意授权,直到结束
最后再运行一下flutter doctor
你会发现还剩一个X没解决:
Visual Studio - develop for Windows X Visual Studio not installed; this is n...
如果您不开发windows phone app,直接忽略这个错误即可。
也就是说环境配置到这个图,就算结束了
本篇完结。
如果您有不同的见解或疑问,欢迎到评论区留言~
如果您感觉深海写的不错的话,请给文章点个赞吧~
要是能够得到您的关注,深海会更加荣幸,感谢各位的支持!
边栏推荐
- 香港服务器iis配置web服务器如何操作?
- docker部署redis一主二从三哨兵模式
- 你好,我的新名字叫 “铜锁 / Tongsuo”
- The full arrangement of the 46th question in C language.Backtracking
- 42.【vector简单列题】
- [Mini Program Column] Summarize the development specifications of uniapp to develop small programs
- Kubernetes 在科技革命中的演变
- 【蓝桥杯选拔赛真题45】Scratch猫鼠游戏 少儿编程scratch蓝桥杯选拔赛真题讲解
- 【WeChat Mini Program】Page Events
- ES报错处理-mapper [xx.xx] of different type, current_type [text], merged_type [keyword]
猜你喜欢
typescript1-typescript是什么
typescript6 - simplify the steps to run ts
2022牛客暑期多校训练营3(ACFGJ)
风靡全球25年的重磅IP,新作沦为脚本乐园
How to calculate the daily cumulative capital flow one by one in real time
ipset restore命令维护set,但原已存在的条目未删除掉
typescript1 - what is typescript
C# uses RestSharp to implement Get, Post requests (2)
sql注入数据库原理详解
IDEA设置System.out.println()和main方法快捷键
随机推荐
Risk Register
typescript7-typescript common types
sql注入数据库原理详解
防止资源导出失败
手把手教学OneOS FOTA升级
mysql设置会话超时时间
leetcode经典问题——11.盛水最多的容器
[GAN]老照片修复Bringing Old Photos Back to Life论文总结
The full arrangement of the 46th question in C language.Backtracking
ES:解构
代币(双代币)系统研究
Interview with Ant: How do these technology pioneers do the bottom-level development well?| Excellent technical team interview
C13—使用innosetup工具制作软件安装向导2022-07-23
动态规划专栏
selenium module
MongoDB - 千万级数据脚本过滤笔记
MagicDraw二次开发过程
SQL window function
input标签的tabindex属性 & a标签的tabindex属性
docker部署redis一主二从三哨兵模式