微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

为Flutter Desktop编译时出错[已解决]

如何解决为Flutter Desktop编译时出错[已解决]

无法为Windows桌面编译我的应用程序。

`Microsoft Windows [version 10.0.17134.1246] (c)2018年微软公司。 Tous驾驶了servservs。

C:\ Users \ CREATIVE的DEV \ AndroidStudioProjects \ Flutter_app> Flutter运行-d Windows 在Windows上以调试模式启动lib \ main.dart ... C:/程序文件(x86)/ Microsoft Visual Studio / 2019 / Community / Common7 / IDE / Comm处的CMake错误 onExtensions / Microsoft / CMake / CMake / share / cmake-3.17 / Modules / CMakeTestCXXCompiler.cmake:53(me ssage): C ++编译器

"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/

bin / Hostx64 / x64 / cl.exe”

无法编译简单的测试程序。

它失败,显示以下输出

Change Dir: C:/Users/CREATIVE'S DEV/AndroidStudioProjects/Flutter_app/build/windows/CMake

文件/ CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuil

d / Current / Bin / MSBuild.exe cmTC_4a34b.vcxproj / p:Configuration = Debug / p:Platform = x64 / p:Visual StudioVersion = 16.0 / v:m && Microsoft(R)Build Engine版本16.7.0 + b89cb5fde倒入.NET Fram 电子作品 版权所有(C)Microsoft Corporation。 Tous驾驶了servservs。

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microso

ft.Common.CurrentVersion.targets(5677,7):错误MSB4023:无法通过d'évaluerlamétadonnéed 'élément“%(FullPath)”。不可能的金属贴花“%(FullPath)” au chemi n d'accès“ @(_ DebugSymbolsIntermediatePath->'C:\ Users \ CREATIVE'S DEV \ AndroidStudioProjects \ fl utter_app \ build \ windows \ CMakeFiles \ CMakeTmp \ Debug%(Filename)%(Extension)')“。 符合dans le chemin d'accès。 [C:\ Users \ CREATIVE的DEV \ AndroidStudioProjects \ Flutter_app
build \ windows \ CMakeFiles \ CMakeTmp \ cmTC_4a34b.vcxproj]

CMake将无法正确生成此项目。 呼叫堆栈(最近的呼叫优先): CMakeLists.txt:2(项目)

正在构建Windows应用程序... 例外:无法生成构建文件 `

解决方法

不符合dans le chemin d'accès的特征。

尝试将项目移动到其中没有'的路径。

,

我通过 snap 安装 flutter 解决了这个问题

sudo snap install flutter --classic

然后这样做就好了

sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev
,

如果你安装了360safeenter image description here,你可以尝试卸载它,然后运行flutter clean,删除window文件夹,运行flutter create .来修复它。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。