flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
9.87k stars 389 forks source link

Error MSB8029 and MSB3073 when doing `flet build windows` #3107

Open Azka79 opened 2 months ago

Azka79 commented 2 months ago

I get a problem every time I do a flet build windows. I've tried upgrading my Flutter and Visual Studio. I even tried changing my TEMP file, but the error warnings MSB8029 and MSB3073 kept appearing. What should I do?

here is the error log:

Flutter bootstrap directory: D:\TEMP\flet_flutter_build_RwfXu2c21J
Additional Flutter dependencies:
{}
Creating Flutter bootstrap project...OK
Customizing app icons and splash images...OK
Generating app icons...
Run subprocess: ['C:\\Users\\nadiy\\dev\\flutter\\bin\\dart.BAT', 'run', 'flutter_launcher_icons']
Resolving dependencies in `D:\TEMP\flet_flutter_build_RwfXu2c21J`... (2.8s)
Downloading packages...
Got dependencies in `D:\TEMP\flet_flutter_build_RwfXu2c21J`.
Building package executable... (1.8s)
Built flutter_launcher_icons:flutter_launcher_icons.
  ════════════════════════════════════════════
     FLUTTER LAUNCHER ICONS (v0.13.1)
  ════════════════════════════════════════════

• Creating default icons Android
• Overwriting the default Android launcher icon with a new icon
• Overwriting default iOS launcher icon with new icon
Creating Icons for Web...
Creating Icons for Windows...
Creating Icons for MacOS...

✓ Successfully generated launcher icons
OK
Packaging Python app...
Run subprocess: ['C:\\Users\\nadiy\\dev\\flutter\\bin\\dart.BAT', 'run', 'serious_python:main', 'package',  
'D:\\KULIAH\\SEMESTER 6\\ASN\\Try GUI', '--dep-mappings', 'flet=flet-embed', '--req-deps', 'flet-embed',    
'--exclude', 'build']
Resolving dependencies in `D:\TEMP\flet_flutter_build_RwfXu2c21J`... 
Downloading packages...
Got dependencies in `D:\TEMP\flet_flutter_build_RwfXu2c21J`.
Building package executable... 
Built serious_python:main.
Running package command
Creating asset directory: D:\TEMP\flet_flutter_build_RwfXu2c21J\app
Copying Python app from D:\KULIAH\SEMESTER 6\ASN\Try GUI to D:\TEMP\serious_python_temp1ff4e45
Installing dependencies [flet-embed] with pip command to D:\TEMP\serious_python_temp1ff4e45\__pypackages__
Extracting Python distributive from D:\TEMP\cpython-3.11.6+20231002-x86_64-pc-windows-msvc-shared-install_only.tar.gz to D:\TEMP\hostpython3.11_117fc14c
Compiling Python sources at D:\TEMP\serious_python_temp1ff4e45
Delete unnecessary files with extensions: [.py, .c, .h, .typed, .exe]
Delete unnecessary files and directories: [__pycache__, bin]
Creating app archive at D:\TEMP\flet_flutter_build_RwfXu2c21J\app/app.zip from D:\TEMP\serious_python_temp1ff4e45
Deleting temp directory D:\TEMP\serious_python_temp1ff4e45
Deleting Python directory D:\TEMP\hostpython3.11_117fc14c
OK
Building Windows app...
Run subprocess: ['C:\\Users\\nadiy\\dev\\flutter\\bin\\flutter.BAT', 'build', 'windows']
Resolving dependencies... 
Downloading packages...
  file_picker 6.2.1 (8.0.2 available)
  fl_chart 0.65.0 (0.67.0 available)
  flutter_lints 2.0.3 (3.0.2 available)
  flutter_markdown 0.6.23 (0.7.1 available)
  flutter_native_splash 2.3.7 (2.4.0 available)
  js 0.6.7 (0.7.1 available)
  leak_tracker 10.0.4 (10.0.5 available)
  leak_tracker_flutter_testing 3.0.3 (3.0.5 available)
  lints 2.1.1 (3.0.0 available)
  material_color_utilities 0.8.0 (0.11.1 available)
  meta 1.12.0 (1.14.0 available)
  package_info_plus 4.2.0 (8.0.0 available)
  package_info_plus_platform_interface 2.0.1 (3.0.0 available)
  petitparser 5.4.0 (6.0.2 available)
  sensors_plus 4.0.2 (5.0.1 available)
  test_api 0.7.0 (0.7.1 available)
  toml 0.14.0 (0.15.0 available)
  xml 6.3.0 (6.5.0 available)
Got dependencies!
18 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.

windows/flutter/CMakeLists.txt does not use FLUTTER_TARGET_PLATFORM, updating.
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\ZERO_CHECK.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\plugins\serious_python_windows\CopyPythonDLLs.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\flutter\flutter_assemble.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\flutter\flutter_wrapper_app.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\flutter\flutter_wrapper_plugin.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\plugins\screen_retriever\screen_retriever_plugin.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\plugins\serious_python_windows\serious_python_windows_plugin.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\format(42): warning STL4038: The contents of <format> are available only with C++20 or later. [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\plugins\serious_python_windows\serious_python_windows_plugin.vcxproj]       
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\plugins\url_launcher_windows\url_launcher_windows_plugin.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\plugins\window_manager\window_manager_plugin.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\plugins\window_to_front\window_to_front_plugin.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\runner\try_gui.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\ALL_BUILD.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: The command "setlocal [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmEnd [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmErrorLevel [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: exit /b %1 [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmDone [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\INSTALL.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :VCEnd" exited with code 1. [D:\TEMP\flet_flutter_build_RwfXu2c21J\build\windows\x64\INSTALL.vcxproj]
Building Windows application...                                   156.9s
Build process failed.
Deleting Flutter bootstrap directory D:\TEMP\flet_flutter_build_RwfXu2c21J

Run subprocess: ['C:\\Users\\nadiy\\dev\\flutter\\bin\\flutter.BAT', '--version']
Error building Flet app - see the log of failed command above.

The information from my flutter doctor does not show any errors and the version of flet is 0.22.0

C:\Users\nadiy>flutter doctor -v
[√] Flutter (Channel beta, 3.22.0-0.3.pre, on Microsoft Windows [Version 10.0.22631.3447], locale en-US)
    • Flutter version 3.22.0-0.3.pre on channel beta at C:\Users\nadiy\dev\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 87b652410d (3 days ago), 2024-04-23 21:41:18 -0500
    • Engine revision b4bfd45986
    • Dart version 3.4.0 (build 3.4.0-282.3.beta)
    • DevTools version 2.34.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\nadiy\AppData\Local\Android\Sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_SDK_ROOT = C:\Users\nadiy\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0--11185874)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2022 17.9.6)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools
    • Visual Studio Build Tools 2022 version 17.9.34728.123
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2023.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • 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 17.0.9+0--11185874)

[√] VS Code (version 1.88.1)
    • VS Code at C:\Users\nadiy\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.86.0

[√] Connected device (4 available)
    • Preview (desktop) • preview • windows-x64    • preview
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22631.3447]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 122.0.6261.131
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 124.0.2478.51

[√] Network resources
    • All expected network resources are available.

• No issues found!
EmberLightVFX commented 2 months ago

I'm having the exact same problem like you have I'm running Python 3.12.2 My flet program lies in a /src/ subdir (/src/main.py)

I'm attaching the logs I'm getting when I run flet build windows src\ -vv

log.txt

echidne commented 1 month ago

Hi. I had the same prob recently. It was working in the past but I decided to install a "full" version of Visual studio not only the components. Bu I forget to check the case for the installation of the desktop development tools in c++ and .net. When I installed them again and I stop to have the MSB8029 and MSB3073 errors

Azka79 commented 1 month ago

Thank you for your suggestion. I have tried installing the C++ and .NET development tools as you recommended, but I am still encountering the same errors (MSB8029 and MSB3073).

Could you provide a more detailed explanation on how to check if the C++ and .NET development tools are installed correctly? Is it necessary to install a previous version of MSVC? Perhaps there are specific steps or settings that I might have missed?

daxel123 commented 1 month ago

I had the same problem and I thought it was the reason for my app to crash after compilation, but in my case, I ignore it and my app works. A small advice, try to create a new environment and check the requirements.txt again and run, I miss one package and that was the error.

echidne commented 1 month ago

@Azka79 do you have only one Visual Build tools installed? Check also if C++ and . net development are installed using modify in the Visual Studio Installer and look if they are checked in "Desktop and Mobile" . image

Azka79 commented 1 month ago

I had the same problem and I thought it was the reason for my app to crash after compilation, but in my case, I ignore it and my app works. A small advice, try to create a new environment and check the requirements.txt again and run, I miss one package and that was the error.

Is there a way to ignore these errors? In my case, the build folder always gets deleted when the build fails. I don't believe there's an issue with my requirements.txt file. I've successfully published it on the web, but these errors keep appearing when I try to build windows.

Azka79 commented 1 month ago

@echidne I believe I already have the necessary C++ and .NET. Screenshot 2024-05-16 082526

echidne commented 1 month ago

Hi @Azka79 , in your screen shot the components look to be correctly installed. Do you have only one visual studio installed? In my case the prob come because I had several version installed and the one that was using flet did not have the C++ and .Net for desktop installed image

Other thing to try : to get rid of problem with requirements: -flet create helloworld

def main(page: ft.Page): page.add(ft.SafeArea(ft.Text("Hello, Flet!")))

ft.app(main)


- Check in requirements.txt you have flet
- then` flet build windows`

If that works that means the visual studio components are correctly installed
Azka79 commented 1 month ago

Hi @echidne , I'm really sorry for the delayed response to your suggestions. I only have one version, could this cause problems? I also tried your suggestion to build on the flet create myapp . But I still get the same error image

echidne commented 1 month ago

Hi @Azka79, If the simple "hello world" app is not building that means we can exclude problemes with external packages. The most logical explannation I'm able to think about is something is wrong with your VS components installation. Can you install that tool from Microsoft ? To do that type that in your Powershell Terminal :

Install-Module VSSetup -Scope CurrentUser

Choose the 'Y' option to install it.

then

Get-VSSetupInstance

and show us the result

ReconFito commented 1 month ago

Hi, I have the same error a few minutes ago, the solution it work for me was creating a requirements.txt on top of my application folder, inside that file I add **flet==0.22.***

Sorry for my bad english.

Azka79 commented 1 month ago

@echidne , I got this

InstanceId          : 8caa50c6
DisplayName         : Visual Studio Build Tools 2022
InstallationVersion : 17.9.34728.123
InstallationPath    : C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools
InstallDate         : 4/8/2024 6:50:33 PM
Azka79 commented 1 month ago

Hi, I have the same error a few minutes ago, the solution it work for me was creating a requirements.txt on top of my application folder, inside that file I add **flet==0.22.***

Sorry for my bad english.

I think I've done that when I run flet create myapp, the requrement.txt file automatically contains flet == 0.22.*

echidne commented 4 weeks ago

Hi @Azka79 ,

What I did today :

nanakura commented 3 weeks ago

Hi @Azka79 ,

What I did today :

  • I Installed a Windows virtual machine to be sure to start from a fresh environment
  • I installed the Visual Studio with components as stated in the medium article cited in the Flet documentations to create Windows apps and choosing the c++ and .net workloads to develop desktop apps (the same ones you picked)
  • I enabled the Developer mode of windows and allow the scripts to be executed in powershell
  • I installed Python 3.12 from python.org and PyCharm(to have an IDE) each time choosing the option that they are Path added
  • I installed the Flutter SDK as described on their website
  • In a virtual environment, I pip install flet
  • then I create the helloworld app and build it .... without problems !!
  • I installed the Microsoft tool to check the Visual studio installation and I obtained: image So i compare to your result and I noticed that there is a difference: you have only the build tools installed when I have the community edition. I have the feeling your problem could come from that. Perhaps you could try to install teh Visual Studio community editions with the c++ and .net workloads for destop development and see if that fix your bugs?

what is your Windows 10 SDK version, i got the same issue with flet build

nanakura commented 3 weeks ago

i can build a flutter project through the following command

flutter create test 
cd test 
flutter build windows

image is there a build flag to specify a build target directory for flet?

echidne commented 3 weeks ago

@nanakura yes you can build from outside the app directory as :

flet build windows path_to_app

you can also specify where you want the build to be done as :

flet build windows -o OUTPUT_DIR
nanakura commented 3 weeks ago

@nanakura yes you can build from outside the app directory as :

flet build windows path_to_app

you can also specify where you want the build to be done as :

flet build windows -o OUTPUT_DIR

-o flag does not work in my computer, and i find some log image It looks like the build error is caused by cmake not finding vcruntime140_1.dll, but I can find this file on the disk image

echidne commented 3 weeks ago

hi @nanakura , What version of visual studio is installed in your system? Please show a result of the flutter doctor -v command
You say its the -o that causes the error but the error look to happen at building app step not when the build is copyed to the ouput_dir. Perhaps posting the full log of the building coudl help to know what is happening (you can obtain it in adding the --verbose flag) I'm not very experimented with Flet but I can try help you.

nanakura commented 3 weeks ago

hi @nanakura , What version of visual studio is installed in your system? Please show a result of the flutter doctor -v command You say its the -o that causes the error but the error look to happen at building app step not when the build is copyed to the ouput_dir. Perhaps posting the full log of the building coudl help to know what is happening (you can obtain it in adding the --verbose flag) I'm not very experimented with Flet but I can try help you.

I didn't mean that this error was caused by "-o". Instead, I meant that the build process of flet is performed in the tmp path, and flet deletes the build files after a build failure. I encountered the exact same issue as @Azka79. Here is my flutter doctor -v:

C:\Users\reika>flutter doctor -v
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure
you trust this source!
[√] Flutter (Channel stable, 3.22.1, on Microsoft Windows [版本 10.0.22631.3593],
    locale zh-CN)
    • Flutter version 3.22.1 on channel stable at D:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a14f74ff3a (2 weeks ago), 2024-05-22 11:08:21 -0500
    • Engine revision 55eae6864b
    • Dart version 3.4.1
    • DevTools version 2.34.3
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[√] Windows Version (Installed version of Windows is version 10 or higher)

[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from:
      https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK
      components.
      (or visit
      https://flutter.dev/docs/get-started/install/windows#android-setup for
      detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio 生成工具 2022 17.10.1)
    • Visual Studio at d:\Program Files (x86)\Microsoft Visual
      Studio\2022\BuildTools
    • Visual Studio 生成工具 2022 version 17.10.34928.147
    • Windows 10 SDK version 10.0.22621.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 unknown)
    • VS Code at C:\Users\reika\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension can be installed from:
       https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
    X Unable to determine VS Code version.

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [版本
      10.0.22631.3593]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome
      124.0.6367.209
    • Edge (web)        • edge    • web-javascript • Microsoft Edge
      125.0.2535.92
echidne commented 3 weeks ago

hi again @nanakura, since you said that you could build from a test app and directory but after you said -o flag was not working for you I assumed that the error you shown was raized by the -o flag. AS I said to @Azka79 the difference I note beetween my working environment and yours is that I'm using Visual Studio Community Edition and not only the components image I had problems when I was using components but that problemes stopped when i installed the Community edition.

nanakura commented 3 weeks ago

hi again @nanakura, since you said that you could build from a test app and directory but after you said -o flag was not working for you I assumed that the error you shown was raized by the -o flag. AS I said to @Azka79 the difference I note beetween my working environment and yours is that I'm using Visual Studio Community Edition and not only the components image I had problems when I was using components but that problemes stopped when i installed the Community edition.

you are right. I installed the Visual Stusio Community Edition and build success image

Yagniksojitra commented 3 weeks ago

Have installed the Visual Studio and VS Tool only C++ as here in screenshot.

Flet

Activate Virtual environment and build the windows app with command "flet build windows" using the Powershell from Visual Studio as shown in screenshot. App build will become successfull.

image