Flutter doctor错误 -- Windows Version (Unable to confirm if installed Windows version is 10 or greater)

回答 5 浏览 2.2万 2022-11-11

我刚刚把我的Flutter从3.5.0-12.0.pre.168更新到3.6.0-1.0.pre.35的主通道上。 我在主通道上,因为在稳定通道上,我有键盘输入的问题。但这不应该与这个问题有任何关系。事实上,这不是一个真正的问题,因为一切都在工作。 只有Flutter doctor有一个新的检查,我以前没有或没有注意到。 它现在检查的是Windows版本。但在我的电脑上它不能检查,我不明白为什么。有什么建议吗?

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 3.6.0-1.0.pre.35, on Microsoft Windows [Version 10.0.19044.2251], locale de-DE)
[X] Windows Version (Unable to confirm if installed Windows version is 10 or greater)
[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.6)
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.71.2)
[√] Connected device (3 available)
[√] HTTP Host Availability

! Doctor found issues in 1 category.

_

flutter --version
Flutter 3.6.0-1.0.pre.35 • channel master • https://github.com/flutter/flutter.git
Framework • revision c021d9177c (56 minutes ago) • 2022-11-10 23:36:02 -0800
Engine • revision 19ead2834a
Tools • Dart 2.19.0 (build 2.19.0-388.0.dev) • DevTools 2.19.0
F.M. 提问于2022-11-11
你是否考虑过代码中存在错误,因为你使用的版本仍然是pre-alpha?在GitHub页面上提出一个问题。Roslan Amir 2022-11-11
我做到了。github.com/flutter/flutter/issues/117890F.M. 2023-01-03
5 个回答
#1楼 已采纳
得票数 8

这是一个操作语言问题。在英文Windows版本上,这个问题没有出现。但在几乎所有其他语言(在我的例子中是德语)上,它都出现了。

主通道的问题得到了解决。 https://github.com/flutter/flutter/issues/117890

F.M. 提问于2023-02-06
#2楼
得票数 6

在你的WINDOWS提示符中写下 Powershell:

C:\>flutter upgrade
C:\>flutter channel master
C:\>flutter doctor -v
Daniele Asteggiante 提问于2023-01-31
解决这个问题mathewsun 2023-02-05
这个修复是误导性的。虽然它能起作用,但你也把正在使用的版本从稳定版变成了开发版,这在积极使用flutter进行开发时是不推荐的。详见@F.M.的回答。要返回到稳定版,请运行flutter channel stable。我们需要等到修复版发布。Max J 2023-02-07
#3楼
得票数 2

我删除了flutter SDK,并安装了最新的SDK,然后这个问题就解决了。 不要忘了设置环境路径。

删除SDK花了很多时间......如果你不能删除它,就重新启动电脑。

yolo 提问于2022-12-09
#4楼
得票数 0

我把我的通道从稳定通道改成了主通道

c:\src\flutter>flutter channel

Flutter channels:

master

main

beta

  • stable

所以我写:flutter channel master

在那之后:flutter doctor

它成功了..

Muhammad Hojiyev 提问于2023-02-24
Muhammad Hojiyev 修改于2023-02-24
您的答案可以通过其他支持信息得到改进。请编辑以添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。您可以在帮助中心找到更多关于如何写出好的答案的信息。Community 2023-03-06
#5楼
得票数 0
I have the same problem and I use @Muhammad Hojiyev solution and it works for me.
Here is the result I got.

C:\Users\sano>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.7.5, on Microsoft Windows [version 10.0.19045.2604], locale fr-FR)
[X] Windows Version (Unable to confirm if installed Windows version is 10 or greater)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.5.0)
[√] Android Studio (version 2022.1)
[√] VS Code (version 1.75.1)
[√] Connected device (3 available)
[√] HTTP Host Availability

! Doctor found issues in 1 category.

C:\Users\sano>flutter channel
Flutter channels:
  master
  main
  beta
* stable

C:\Users\sano>flutter channel master
Switching to flutter channel 'master'...
git: From https://github.com/flutter/flutter
git:    1155d2719d..cab761d1d3  main       -> origin/main
git:    1155d2719d..cab761d1d3  master     -> origin/master
git: branch 'master' set up to track 'origin/master'.
git: Switched to a new branch 'master'
Successfully switched to flutter channel 'master'.
To ensure that you're on the latest build from this channel, run 'flutter upgrade'

C:\Users\sano>flutter doctor
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine 9f247021387ac43215bc9b5ea42e7fbc3813aba0...
Expanding downloaded archive...
Building flutter tool...
Running pub upgrade...
Downloading package sky_engine...                                  768ms
Downloading flutter_patched_sdk tools...                           816ms
Downloading flutter_patched_sdk_product tools...                   792ms
Downloading windows-x64 tools...                                    7,2s
Downloading windows-x64/font-subset tools...                       545ms
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 3.8.0-15.0.pre.45, on Microsoft Windows [version 10.0.19045.2604], locale fr-FR)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.5.0)
[√] Android Studio (version 2022.1)
[√] VS Code (version 1.75.1)
[√] Connected device (3 available)
[√] Network resources

• No issues found!`enter code here
Asse 提问于2023-02-24