一. 如果你是download的release包,运行flutter doctor会报如下错误:
Error: The Flutter directory is not a clone of the GitHub project.
The flutter tool requires Git in order to operate properly;
to set up Flutter, run the following command:
git clone -b beta https://github.com/flutter/flutter.git
解决方案:
- 在flutter目录执行
git init。不推荐 -
git clone https://github.com/flutter/flutter.git或者按官方推荐git clone -b beta https://github.com/flutter/flutter.git使用beta分支。
二、安装中文版教程中安装iOS设备的工具时会报错:
checking pkg-config is at least version 0.9.0... yes checking for libusbmuxd >= 1.1.0... no configure: error: Package requirements (libusbmuxd >= 1.1.0) were not met:
Requested 'libusbmuxd >= 1.1.0' but version of libusbmuxd is 1.0.10
解决方案在英文版中已经提供:
brew update
# The following two steps are a temporary workaround to https://github.com/flutter/flutter/issues/22595
brew install --HEAD usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller ios-deploy cocoapods
pod setup
所以还是推荐大家去看英文原版教程,更新比较及时。
三、最新的Android Studio Preview版本不支持flutter,建议使用正式版。
Flutter安装与配置常见问题解决
本文档提供了Flutter安装过程中的常见问题解决方案,包括下载release包后运行flutter doctor的错误处理,安装iOS设备工具时遇到的依赖问题解决,以及推荐使用稳定版Android Studio而非预览版的建议。
4966

被折叠的 条评论
为什么被折叠?



