为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 .来修复它。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...