Flutter GetSystemMetricsForDpi not located

Viewed 587

We build a windows desktop application using flutter desktop and want to distribute it. But after distributing exe file, we got error

The procedure entry point GetSystemMetricsForDpi could not be located in the dynamic link library USER32.dll

This error only show in windows 7 and application works properly on windows 10. Please help us to solve this issue. Thank you

1 Answers

That function is only available in Windows 10, so there's no way to make your application run on Windows 7 as-is. However, than function isn't used in a stock Flutter application, so either:

  • you added it to your Runner code, in which case the solution is not to do that, and to do whatever you are trying to do in a Windows 7-compatible way, or
  • you are using a plugin that calls it, in which case you need to either:
    • stop using that plugin, or
    • ask the plugin's developer to support Windows 7.
Related