Flutter 踩坑

Flutter 踩坑,第1张

概述#sudovim/etc/pacman.conf启用multilib因为需要用到依赖lib32-libglvnd#sudopacman-Syu#sudopacman-Sflutter#flutterdoctor,果然报错,根据提示查看/home/seliote/flutter_01.log报错FileSystemException:Cannotopenfile,path='/opt/flutter/bin/

# sudo vim /etc/pacman.conf 启用 multilib 因为需要用到依赖 lib32-libglvnd

# sudo pacman -Syu

# sudo pacman -S Flutter

# Flutter doctor, 果然报错, 根据提示查看 /home/seliote/Flutter_01.log 报错 filesystemexception: Cannot open file, path = '/opt/Flutter/bin/cache/Flutter_version_check.stamp' (OS Error: Permission denIEd, errno = 13 执行 # sudo chmod -R 777 /opt/Flutter

再次 # Flutter doctor, 漫长的等待, 1, Unable to locate AndroID SDK. 2, AndroID Studio (not installed) 3, IntelliJ IDEA ultimate Edition Flutter plugin not installed 4, No devices available, 报错暂时不管,猜测应该不会影响 Web 的开发, 这里后面如果要用 AndroID Studio 的话不能直接用 AndroID Studio 下载的 SDK,而需要用 pacman 源里的,在安装 AndroID SDK 的时候指明路径

AndroID licenses not accepted 这个问题着实尴尬,按照提示 Flutter doctor --androID-licenses 后卡在 58% 好几个小时不动,但是有人说 linux 下会这样,没影响

打开 VSCode VIEw -> Command Palette 输入 install 选择 Extensions: Install Extension, 搜索 Flutter 安装, 安装完成后重启 VSCode

再次 Flutter doctor 提示 Proxy Configuration 需要设置环境变量 export no_proxy="localhost,127.0.0.1"

先试试,VSCode VIEw -> Command Palette,输入 Flutter,选择 new project,选择存储文件夹后就开始新建项目,等待...卡在 Flutter pub get,应该是镜像有问题,取消掉去设置环境变量,这些都写进 /etc/profile, 为全系统所有用户都添加,然后重启,至于 http_proxy 与 https_proxy 这两个,需要一个稳定的爬墙虎,但是 CHACHA20 在 QT5 上下载东西一会就断掉
export ANDROID_HOME='/opt/androID-sdk/'export no_proxy="localhost,127.0.0.1"export PUB_HOSTED_URL=https://pub.Flutter-io.cnexport FlutteR_STORAGE_BASE_URL=https://storage.Flutter-io.cnexport http_proxy='http://localhost:1080'export https_proxy='http://localhost:1080'
总结

以上是内存溢出为你收集整理的Flutter 踩坑全部内容,希望文章能够帮你解决Flutter 踩坑所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/web/1066734.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-26
下一篇2022-05-26

发表评论

登录后才能评论

评论列表(0条)

    保存