Flutter(一)--Flutter安装遇到的问题汇总Flutter(一)--Flutter安装遇到的问题汇总

2021-08-09 14:02:18 浏览数 (1)

1,下载git clone

代码语言:javascript复制
https://github.com/flutter/flutter.git

2,flutter doctor


问题:-bash: fultter: command not found 解决:

代码语言:javascript复制
export PATH=/Users/对应资源位置/flutter/bin:$PATH

3 更新环境变量

文档上标明的: export PATH=pwd/flutter/bin:$PATH

可以使用但是只是暂时针对当前命令行窗口,要想是永久使用则需要更新环境变量则需要编辑profile. vim ~/.bash_profile then

代码语言:javascript复制
export PATH=$PATH:/Users/liuheng/flutterDev/flutter/bin
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
source ~/.bashrc

最后重新打开iterm

4,iOS相关配置

问题1:Verify that all connected devices have been paired with this computer in Xcode

解决:根据终端提示即可

代码语言:javascript复制
brew update
brew uninstall --ignore-dependencies libimobiledevice
brew uninstall --ignore-dependencies usbmuxd
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
问题2:RPC failed; curl 18 transfer closed with outstanding read data remaining 项目太极没有更新,tag资源文件太大超时了。

解决:

代码语言:javascript复制
    git config --global http.postBuffer 524288000 

可惜并没解决,尝试使用官方镜像下载(之前我是打开vpn)

代码语言:javascript复制
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

5,android配置

问题1:

✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. 解决:

代码语言:javascript复制
在plugin中搜索flutter并安装。关闭后重新打开android studio即可。
可以看得出自己人有多好说话。。。
问题2:

Dart SDK is not Configured 解决:

代码语言:javascript复制
1,打开Preferences->Languages&Frameworks->Flutter->设置Flutter SDK Path为Flutter文件夹路径
2,打开Preferences->Languages&Frameworks->Dart->选中Enable->./bin/cache/dart-sdk

传送门:

Flutter-汇总

0 人点赞