1. flutter更新到最新3.7,dart sdk要自己重新配置路径,一般都是fltter里面自带bin路径
> 标注:以下的问题主要是为了兼容一些插件包!!例如desktop_webview_window等
-
运行时报错Cannot open file, path = 'pubspec.lock' (OS Error: 拒绝访问。 , errno = 5),原因是文件或者文件夹权限问题,打开属性-安全-权限给读写或全部就好
-
权限问题后又出现新错误(下面)
Nuget is not installed.
CMake Error at flutter/ephemeral/.plugin_symlinks/webview_windows/windows/CMakeLists.txt:29 (message): Integrity check for D:/pro/build/windows/nuget.exe failed.
- 原因:nuget没下载并且没配置系统变量和环境变量(解决方法显而易见)
- 没想到啊,还是报错
#error The <experimental/coroutine> and <experimental/resumable> headers are only supported \ C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): error MSB3073: setlocal [D:\pro\build\windows\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): error MSB3073: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake [D:\pro\build\windows\INSTALL.vcxproj] with /await and implement preC++20 coroutine support. Use for standard C++20 coroutines.
- 原因是visual studio 的内置配件要升级到win 11sdk
- 最后!!!最重要的!!!先清缓存flutter clean,再pub get运行!!!