flutter-plugins icon indicating copy to clipboard operation
flutter-plugins copied to clipboard

I get this error when running on Windows

Open ElgizCebrayilov992 opened this issue 2 years ago • 3 comments

win_toast_plugin.obj : error LNK2019: unresolved external symbol WINRT_GetRestrictedErrorInfo referenced in function "public: __cdecl winrt::hresult_error::hresult_error(struct winrt::hresult,struct winrt::take_ownership_from_abi_t)" (??0hresult_error@winrt@@QEAA@Uhresult@1@Utake_ownership_from_abi_t@1@@Z) [D:\new\toast_example\build\windows\plugins\win_toast\win_toast_plugin.vcxproj] DesktopNotificationManagerCompat.obj : error LNK2001: unresolved external symbol WINRT_GetRestrictedErrorInfo [D:\new\toast_example\build\windows\plugins\win_toast\win_toast_plugin.vcxproj] win_toast_plugin.obj : error LNK2019: unresolved external symbol WINRT_RoGetActivationFactory referenced in function "struct winrt::Windows::Foundation::IActivationFactory __cdecl winrt::get_activation_factory<struct winrt::Windows::Foundation::IActivationFactory>(struct winrt::param::hstring const &)" (??$get_activation_factory@UIActivationFactory@Foundation@Windows@winrt@@@winrt@@YA?AUIActivationFactory@Foundation@Windows@0@AEBUhstring@param@0@@Z) [D:\new\toast_example\build\windows\plugins\win_toast\win_toast_plugin.vcxproj] DesktopNotificationManagerCompat.obj : error LNK2001: unresolved external symbol WINRT_RoGetActivationFactory [D:\new\toast_example\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]

ElgizCebrayilov992 avatar Jan 20 '23 11:01 ElgizCebrayilov992

Hey! I also ran into this issue. Seems like it's using a newer feature. I had Visual Studio 2019 (16) installed. Upgraded to 2022 (17), ran flutter clean and then flutter build windows and it worked!

dballard avatar May 19 '23 17:05 dballard

I have the same problem , ran flutter clean and then flutter build windows and not it solved. other solution?

gambertin avatar Oct 25 '23 23:10 gambertin