Search code examples
windowsflutterexeflutter-buildflutter-windows

Flutter .exe Release not running on Windows


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


Solution

  • 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