0

When I build flutter for windows with flutter build windows it generates a .exe file with its .dll files etc. However, running that file (.exe) gives me a white screen and my app is not running normally.

Running flutter run --release -d windows however builds my app normally and I can use it.

What is wrong here that running the .exe file is not starting my app properly?

This is my release folder structure when running flutter build windows:

enter image description here

Running the .exe file:

enter image description here

6
  • can you try flutter clean and again rebuild the app Commented Sep 18, 2022 at 6:51
  • @YeasinSheikh still not working Commented Sep 18, 2022 at 7:32
  • Can you the same approach on different project Commented Sep 18, 2022 at 7:33
  • on a brand new flutter project, the .exe runs fine, but I have no idea what could cause this. Even when I remove all custom code from the build method in .main the issue still appears. I think maybe it's an issue with a third party library but I don't know how I could address this. @YeasinSheikh Commented Sep 18, 2022 at 7:41
  • could be, you can check the package if those are supported for windows. also if something went wrong with source, you create a copy of the project and run flutter create .. Commented Sep 18, 2022 at 7:52

1 Answer 1

2

I was using sqflite_common_ffi on Windows and this was causing the issue. Initializing it was only valid for debug thus I had to add the sqlite3.dll to the release build folder. Then it worked fine like before when starting the .exe file.

Detailed description can be found here: https://github.com/tekartik/sqflite/issues/574

Sign up to request clarification or add additional context in comments.

1 Comment

you can download sqlite3.dll official file from here sqlite.org/download.htmllink

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.