首页 > 解决方案 > “目前配置的 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.)

我能做些什么来解决这些问题?(谢谢收听 :)

标签: fluttersdk

解决方案


使用最新的 Flutter SDK,然后使用 git --version 从命令行检查 git 是否可用。如果命令行 android studio 终端不可用,则将 git 添加到系统路径变量并重新启动 android studio。


推荐阅读