#windows #flutter #cmake
Вопрос:
У меня проблема с запуском моего приложения Flutter в Windows. Если я создам и запущу приложение Windows flutter build windows
, оно будет работать, и я смогу запустить приложение. Но если я хочу начать с flutter run
этого, есть ошибка. Я предполагаю, что это как-то связано с дубаггером.
Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.282] Chrome (web) • chrome • web-javascript • Google Chrome 95.0.4638.69 Edge (web) • edge • web-javascript • Microsoft Edge 95.0.1020.44 [1]: Windows (windows) [2]: Chrome (chrome) [3]: Edge (edge) Please choose one (To quit, press "q/Q"): 1 Running "flutter pub get" in school... 541ms Launching libmain.dart on Windows in debug mode... Building Windows application... Error waiting for a debug connection: The log reader stopped unexpectedly. Error launching application on Windows.
Вот мой вывод Flutter Docotr:
[√] Flutter (Channel stable, 2.5.3, on Microsoft Windows [Version 10.0.22000.282], locale de-DE) • Flutter version 2.5.3 at D:Progammingflutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 18116933e7 (4 weeks ago), 2021-10-15 10:46:35 -0700 • Engine revision d3ea636dc5 • Dart version 2.14.4 [√] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at D:ProgammingAndroidSDK • Platform android-30, build-tools 31.0.0 • Java binary at: C:Usersfito0AppDataLocalJetBrainsToolboxappsAndroidStudioch-0203.7784292jrebinjava • Java version OpenJDK Runtime Environment (build 11.0.10 0-b96-7249189) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:Program FilesGoogleChromeApplicationchrome.exe [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.5) • Visual Studio at C:Program Files (x86)Microsoft Visual Studio2019Community • Visual Studio Community 2019 version 16.11.31729.503 • Windows 10 SDK version 10.0.19041.0 [√] Android Studio (version 2020.3) • Android Studio at C:Usersfito0AppDataLocalJetBrainsToolboxappsAndroidStudioch-0203.7784292 • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.10 0-b96-7249189) [√] IntelliJ IDEA Ultimate Edition (version 2021.2) • IntelliJ at C:Usersfito0AppDataLocalJetBrainsToolboxappsIDEA-Uch-0212.5457.46 • Flutter plugin version 62.0.3 • Dart plugin version 212.5632 [√] VS Code (version 1.62.0) • VS Code at C:Usersfito0AppDataLocalProgramsMicrosoft VS Code • Flutter extension version 3.28.0 [√] Connected device (3 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.282] • Chrome (web) • chrome • web-javascript • Google Chrome 95.0.4638.69 • Edge (web) • edge • web-javascript • Microsoft Edge 95.0.1020.44 • No issues found!
Вот подробный отчет о сбое с flutter run
[...] [ 24 ms] -- Install configuration: "Debug" [ 455 ms] -- Up-to-date: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/icudtl.dat [ ] -- Up-to-date: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/flutter_windows.dll [ ] -- Up-to-date: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/connectivity_plus_windows_plugin.dll [ 7 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets [ ] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/AssetManifest.json [ ] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/FontManifest.json [ ] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts [ ] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts/Cabin [ ] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts/Cabin/Cabin-Italic-VariableFont_wdth,wght.ttf [ 1 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts/Cabin/Cabin-VariableFont_wdth,wght.ttf [ 1 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts/Exo_2 [ ] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts/Exo_2/Exo2-Italic-VariableFont_wght.ttf [ 1 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts/Exo_2/Exo2-VariableFont_wght.ttf [ 1 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts/Gluten [ ] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts/Gluten/Gluten-VariableFont_wght.ttf [ 1 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts/MaterialIcons-Regular.otf [ 3 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts/Schoolvito(1).png [ 1 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts/Schoolvito.png [ ] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts/Teko [ ] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts/Teko/Teko-Bold.ttf [ 3 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts/Teko/Teko-Light.ttf [ 1 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts/Teko/Teko-Medium.ttf [ 1 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts/Teko/Teko-Regular.ttf [ 2 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/fonts/Teko/Teko-SemiBold.ttf [ 2 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/kernel_blob.bin [ 115 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/NOTICES [ 2 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/NOTICES.Z [ 1 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/packages [ ] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/packages/cupertino_icons [ ] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/packages/cupertino_icons/assets [ ] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf [ 1 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/pictures [ ] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/pictures/Book-Placeholder.jpg [ 1 ms] -- Installing: C:/Users/fito0/IdeaProject/school/build/windows/runner/Debug/data/flutter_assets/pictures/Profile-Placeholder.png [ 8 ms] FinalizeBuildStatus: [ 1 ms] Die Datei "x64DebugINSTALLINSTALL.tlogunsuccessfulbuild" wird gelöscht. [ ] Aktualisieren des Timestamps von "x64DebugINSTALLINSTALL.tlogINSTALL.lastbuildstate". [ ] Die Erstellung von Projekt "C:Usersfito0IdeaProjectschoolbuildwindowsINSTALL.vcxproj" ist abgeschlossen (Standardziele). [ ] Der Buildvorgang wurde erfolgreich ausgeführt. [ ] 0 Warnung(en) [ ] 0 Fehler [ 1 ms] Verstrichene Zeit 00:00:07.10 [ 17 ms] Building Windows application... (completed in 7,5s) [ 22 ms] Error waiting for a debug connection: The log reader stopped unexpectedly. [ 1 ms] Error launching application on Windows. [ 47 ms] "flutter run" took 9.951ms. [ 3 ms] #0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3) #1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:669:9) lt;asynchronous suspensiongt; #2 FlutterCommand.run.lt;anonymous closuregt; (package:flutter_tools/src/runner/flutter_command.dart:1125:27) lt;asynchronous suspensiongt; #3 AppContext.run.lt;anonymous closuregt; (package:flutter_tools/src/base/context.dart:150:19) lt;asynchronous suspensiongt; #4 CommandRunner.runCommand (package:args/command_runner.dart:209:13) lt;asynchronous suspensiongt; #5 FlutterCommandRunner.runCommand.lt;anonymous closuregt; (package:flutter_tools/src/runner/flutter_command_runner.dart:288:9) lt;asynchronous suspensiongt; #6 AppContext.run.lt;anonymous closuregt; (package:flutter_tools/src/base/context.dart:150:19) lt;asynchronous suspensiongt; #7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:236:5) lt;asynchronous suspensiongt; #8 run.lt;anonymous closuregt;.lt;anonymous closuregt; (package:flutter_tools/runner.dart:62:9) lt;asynchronous suspensiongt; #9 AppContext.run.lt;anonymous closuregt; (package:flutter_tools/src/base/context.dart:150:19) lt;asynchronous suspensiongt; #10 main (package:flutter_tools/executable.dart:92:3) lt;asynchronous suspensiongt; [ 14 ms] ensureAnalyticsSent: 13ms [ ] Running shutdown hooks [ ] Shutdown hooks complete [ ] exiting with code 1
My installed dependencies
:
flutter: sdk: flutter flutter_localizations: sdk: flutter cupertino_icons: ^1.0.4 shared_preferences: ^2.0.8 provider: ^6.0.1 intl: ^0.17.0 http: ^0.13.4 path_provider: ^2.0.4 connectivity_plus: ^2.0.1
Unfortunately, I do not know how to solve the problem…. I’m looking for quite a while, without result. Does anyone know how I can solve the problem