bitsdojo / bitsdojo_window

A Flutter package that makes it easy to customize and work with your Flutter desktop app window.
http://www.youtube.com/watch?v=bee2AHQpGK4
MIT License
815 stars 229 forks source link

App doesn't start in Windows 11 (build is ok) #164

Closed devtud closed 2 years ago

devtud commented 2 years ago

Windows 11 version: 22H2 OS build: 22598.100

After building the app I get an error when I try to run it:

Launching lib\main.dart on Windows in debug mode...
Building Windows application...
Error waiting for a debug connection: The log reader stopped unexpectedly, or never started.
Error launching application on Windows.

If I remove the two lines for bitsdojo from the beginning of windows/runner/main.cpp the app is working (of course it adds the system title bar).

The lines:

#include <bitsdojo_window_windows/bitsdojo_window_plugin.h>
auto bdw = bitsdojo_window_configure(BDW_CUSTOM_FRAME | BDW_HIDE_ON_STARTUP);

Until I realized the issue is caused by bitsdojo I tried reinstalling Visual Studio (2019/2022) and various Windows SDKs (for win 10 and 11). No matter what I tried, the app still cannot start on Windows 11.

But if I build it on Windows 11 and I run it on Windows 10 the app starts and works ok. So I conclude that it's only a runtime issue on my build of Windows 11.

tianshaojie commented 2 years ago

I used this change to solve my problem, https://github.com/bitsdojo/bitsdojo_window/pull/134/commits/73984019864ac83053bd47d0a8f5e524bffba32b

devtud commented 2 years ago

I used this change to solve my problem, 7398401

Thanks. I didn't realize that I created a duplicate and that a fix is already developed. Closing this..