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

1,下载git clone

https://github.com/flutter/flutter.git

2,flutter doctor


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

export PATH=/Users/对应资源位置/flutter/bin:$PATH

3 更新环境变量

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

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

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

解决:根据终端提示即可

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资源文件太大超时了。

解决:

    git config --global http.postBuffer 524288000 

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

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.
解决:

在plugin中搜索flutter并安装。关闭后重新打开android studio即可。
可以看得出自己人有多好说话。。。

问题2:

Dart SDK is not Configured
解决:

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

传送门:

Flutter-汇总

推荐阅读更多精彩内容