Окна Flutter: сбой процесса сборки: \Microsoft.CppCommon.targets(241,5): ошибка MSB8066
Я успешно использую флаттер-окна для запуска своего приложения. Однако недавно я загрузил Android Studio, и внезапно мои флаттер-окна перестали работать. Он выдал ошибку следующим образом:
Launching lib\main.dart on Windows in debug mode...
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'C:\Users\Schwar
tzLab\PycharmProjects\bahavior_rig\behavior_gui\build\windows\CMakeFiles\3a7123e8b5d134f8b6f9d9b7be4b7e62\flutter_windows.dll.rule;C:\Users\SchwartzLab\PycharmProjects\baha
vior_rig\behavior_gui\build\windows\CMakeFiles\350a25350ac520c3b2e8372c37f12801\flutter_assemble.rule' exited with code 1. [C:\Users\SchwartzLab\PycharmProjects\bahavior_ri
g\behavior_gui\build\windows\flutter\flutter_assemble.vcxproj]
Building Windows application...
Exception: Build process failed.
Я удалил Android Studio, переустановил Visual Studio2019 и трепещу. Однако ошибка не исчезла.
Это доктор трепетания:
[√] Flutter (Channel dev, 2.3.0-16.0.pre, on Microsoft Windows [Version 10.0.18363.1621], locale en-US)
• Flutter version 2.3.0-16.0.pre at C:\Users\SchwartzLab\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision fa5883b78e (4 weeks ago), 2021-05-21 13:04:03 -0700
• Engine revision 2f067fc4c5
• Dart version 2.14.0 (build 2.14.0-136.0.dev)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\SchwartzLab\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: C:\Users\SchwartzLab\anaconda3\envs\bahavior_rig_\Library\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.6+8-b765.1)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.10.2)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.10.31410.357
• Windows 10 SDK version 10.0.19041.0
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
[√] VS Code (version 1.57.0)
• VS Code at C:\Users\SchwartzLab\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.20.0
[√] Connected device (4 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.18363.1621]
• Windows (UWP) (desktop) • winuwp • windows-uwp-x64 •
• Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.101
• Edge (web) • edge • web-javascript • Microsoft Edge 89.0.774.68
! Doctor found issues in 1 category.
Это же приложение создано на другом ноутбуке.
1 ответ
Ни разу не встречал такого вопроса. Я использую стабильный канал.
[✓] Flutter (Channel stable, 2.0.5, on Microsoft Windows [Version 10.0.19043.1052], locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.4)
[✓] Android Studio (version 4.1.0)
[✓] VS Code, 64-bit edition (version 1.57.1)
[✓] Connected device (3 available)
Попробуй переключить
Channel dev
к
Channel stable
.