flutter - “目前配置的 Flutter SDK 不知道是否完全支持。请更新你的 SDK 并重启 IntelliJ”
问题描述
自上周以来,我一直在尝试解决一个问题,我一直在寻找这个问题,但没有任何效果。我试图重新安装颤振并没有工作。下图是我遇到的第一个问题。
然后我转到“工具 -> Flutter -> Flutter Upgrade”,它向我显示了这条消息:
C:\src\flutter\bin\flutter.bat --no-color upgrade
fatal: unterminated line in .git/packed-refs: ...
Building flutter tool...
Running pub upgrade...
ProcessException: Process exited abnormally:
fatal: unterminated line in .git/packed-refs: ...
Command: git fetch --tags
Process finished with exit code 1
当我点击“运行'main.dart'”时,它会显示这条消息:
fatal: unterminated line in .git/packed-refs: ...
Building flutter tool...
Running pub upgrade...
Running "flutter pub get" in olx...
The current Flutter SDK version is 0.0.0-unknown.
Because carousel_pro 1.0.0 requires Flutter SDK version >=1.2.0 <2.0.0 and no versions of carousel_pro match >1.0.0 <2.0.0, carousel_pro ^1.0.0 is forbidden.
So, because olx depends on carousel_pro ^1.0.0, version solving failed.
pub get failed (1; So, because olx depends on carousel_pro ^1.0.0, version solving failed.)
我能做些什么来解决这些问题?(谢谢收听 :)
解决方案
使用最新的 Flutter SDK,然后使用 git --version 从命令行检查 git 是否可用。如果命令行 android studio 终端不可用,则将 git 添加到系统路径变量并重新启动 android studio。
推荐阅读
- firebase - 如何使用开放规则启动 Firebase 实时数据库模拟器?
- python - 如何在迭代时从嵌套列表创建垂直列表
- azure - 使用设备客户端和使用 HTTP DELETE 的设备预配服务在 azure iot hub 中删除(取消预配)设备
- data-visualization - Amcharts 水平条形图标签问题
- python - 混淆我的 DL 模型和 Python 的最佳方法?
- scala - Scala Option 获取键值
- java - 例外:期待菜单,得到 androidx.constraintlayout.widget.ContstraintLayout
- sql - SQL 创建三个表并与之交互
- amazon-web-services - ECS 可以在单独的帐户中访问 ECR
- html - 如何为网格中的各个列着色