在使用Flutter进行Windows应用开发时,是什么原因导致“Custom build for...exited with code 1”错误?

jckbn6z7  于 2023-06-07  发布在  Flutter
关注(0)|答案(1)|浏览(288)

正在Windows上以调试模式启动lib\main.dart...正在生成Windows应用程序...找不到Nuget.exe,正在尝试下载或使用缓存版本。CMake警告(dev)位于C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/ExternalProject.cmake:3071(message):未给出DOWNLOAD_EXTRACT_TIMESTAMP选项,并且未设置策略CMP 0135。将使用策略的OLD行为。当使用URL下载时,所提取的文件的时间戳应当优选地是提取时间的时间戳,否则如果URL改变,则依赖于所提取的内容的代码可能不会被重建。OLD行为保留存档中的时间戳,但这通常不是您想要的。将项目更新为NEW行为或将DOWNLOAD_EXTRACT_TIMESTAMP选项指定为true值以避免此健壮性问题。调用堆栈(最新调用优先):C:/Program Files/Microsoft Visual Studio/2022/Community/Common 7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.24/Modules/ExternalProject.cmake:4167(_ep_add_download_command)CMakeLists.txt:9(ExternalProject_Add)此警告适用于项目开发人员。使用-Wno-dev来抑制它。

../../../AppData/Local/Pub/Cache/hosted/pub.dev/pluto_grid-6.0.4/lib/src/widgets/pluto_scrollbar.dart(493,39):错误G 036 AE 10 F:必须提供必需的命名参数“devicePixelRatio”。[C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\flutter\flutter_assemble.vcxproj] ../../../AppData/Local/Pub/Cache/hosted/pub.dev/pluto_grid-6.0.4/lib/src/widgets/pluto_scrollbar.dart(511,39):错误G 036 AE 10 F:必须提供必需的命名参数“devicePixelRatio”。[C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\flutter\flutter_assemble.vcxproj] ../../../AppData/Local/Pub/Cache/hosted/pub.dev/printing-5.9.3/lib/src/widget_wrapper.dart(234,9):错误G5 FE 39 F1 E:未找到类型“ui.ViewConfiguration”。[C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\flutter\flutter_assemble.vcxproj] ../../../AppData/Local/Pub/Cache/hosted/pub.dev/printing-5.9.3/lib/src/widget_wrapper.dart(241,3):错误G5 FE 39 F1 E:未找到类型“ui.ViewConfiguration”。[C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\flutter\flutter_assemble.vcxproj] ../../../AppData/Local/Pub/Cache/hosted/pub.dev/printing-5.9.3/lib/src/widget_wrapper.dart(174,27):错误G311314 CC:未找到方法:“视图配置”。[C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\flutter\flutter_assemble.vcxproj] ../../../AppData/Local/Pub/Cache/hosted/pub.dev/printing-5.9.3/lib/src/widget_wrapper.dart(173,7):错误GC 6690633:没有名称为“window”的命名参数。[C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\flutter\flutter_assemble.vcxproj] ../../../AppData/Local/Pub/Cache/hosted/pub.dev/printing-5.9.3/lib/src/widget_wrapper.dart(232,3):错误GB 23 DA 612:超类'ui. FlutterView'没有不带参数的未命名构造函数。[C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\flutter\flutter_assemble.vcxproj] ../../../AppData/Local/Pub/Cache/hosted/pub.dev/printing-5.9.3/lib/src/widget_wrapper.dart(234,12):错误G6 A1 FD 7 CD:“ViewConfiguration”不是类型。[C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\flutter\flutter_assemble.vcxproj] ../../../AppData/Local/Pub/Cache/hosted/pub.dev/printing-5.9.3/lib/src/fonts/font.dart(47,15):错误GDC 3DF 8B 3:'AssetManifest'从'package:flutter/src/services/asset_manifest.dart'和'package:printing/src/fonts/manifest. dart'导入。[C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\flutter\flutter_assemble.vcxproj] ../../../AppData/Local/Pub/Cache/hosted/pub.dev/screenshot-1.3.0/lib/screenshot.dart(160,7):错误GC 6690633:没有名称为“window”的命名参数。[C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\flutter\flutter_assemble.vcxproj] ../../../AppData/Local/Pub/Cache/hosted/pub.dev/qr_flutter-4.1.0/lib/src/qr_painter.dart(114,8):错误G5 FE 39 F1 E:未找到类型“QrImage”。[C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\flutter\flutter_assemble.vcxproj] ../../../AppData/Local/Pub/Cache/hosted/pub.dev/qr_flutter-4.1.0/lib/src/qr_painter.dart(114,8):错误G5641 BFAA:'QrImage'不是类型。[C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\flutter\flutter_assemble.vcxproj] ../../../AppData/Local/Pub/Cache/hosted/pub.dev/qr_flutter-4.1.0/lib/src/qr_painter.dart(156,16):错误GE 5CFE 876:未为类“QrPainter”定义方法“QrImage”。[C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\flutter\flutter_assemble.vcxproj] ../../../AppData/Local/Pub/Cache/git/Flutter_Pinput-2c198e46e1fa18a15d4667aa2d939bcbb04c7c39/lib/src/widgets/_pinput_selection_gesture_detector_builder.dart(20,39):错误G4906 CC 7 E:方法“_PinputSelectionGestureDetectorBuilder.onDoubleTapDown”的参数“details”具有类型“TapDownDetails”,该类型与重写方法“TextSelectionGestureDetectorBuilder. onDoubleTapDown”中的相应类型“TapDragDownDetails”不匹配。[C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\flutter\flutter_assemble.vcxproj] ../../../AppData/Local/Pub/Cache/git/Flutter_Pinput-2c198e46e1fa18a15d4667aa2d939bcbb04c7c39/lib/src/widgets/_pinput_selection_gesture_detector_builder.dart(27,35):错误G4906 CC 7 E:方法“_PinputSelectionGestureDetectorBuilder.onSingleTapUp”的参数“details”具有类型“TapUpDetails”,该类型与重写方法“TextSelectionGestureDetectorBuilder. onSingleTapUp”中的相应类型“TapDragUpDetails”不匹配。[C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\flutter\flutter_assemble.vcxproj] ../../../AppData/Local/Pub/Cache/git/Flutter_Pinput-2c198e46e1fa18a15d4667aa2d939bcbb04c7c39/lib/src/widgets/_pinput_selection_gesture_detector_builder.dart(28,25):错误GC 2F 972 A8:无法将参数类型“TapUpDetails”分配给参数类型“TapDragUpDetails”。[C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\flutter\flutter_assemble.vcxproj] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5):错误MSB 8066:自定义构建为'C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\CMakeFiles\2d94be21d12b969ef228ad8a1e224996\flutter_windows.dll. rule; C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\CMakeFiles\8444c9888fde3357a1864f3c274dfabd\flutter_assemble.rule'退出,代码为% 1。[C:\Users\Admin\StudioProjects\smart_masjid new\smasjid_client\build\windows\flutter\flutter_assemble.vcxproj]异常:生成过程失败。

当我在与该项目工作,Flutter要求升级Flutter,然后我更新了发布升级依赖的包在Flutter,也运行Flutterupgarde,后Flutter升级,然后我运行代码,然后它显示错误,我在问题中附加,请给予我解决这个错误

eqqqjvef

eqqqjvef1#

看起来软件包在Flutter 3.10中被破坏,但现在已经修复:
https://github.com/SachinGanesh/screenshot/issues/139
只需将pubspec.yaml更新到2.1.0

screenshot: ^2.1.0

相关问题