1

I'm working on a Windows application in Flutter, and have been usingthe firebase_core 2.15.10 library. Everything was running find until recently untill I started getting this error. The error seems to be comingfrom firebase/variant.h, and here's what itlooks like:

C:\Users\XXXX\AndroidStudioProjects\delete_later\build\windows\extracted\firebase_cpp_sdk\include\firebase/variant.h(801,7): error C2220: the following warning is treated as an error [C:\Users\XXX\AndroidStudioProjects\delete_later\build\windows\plugins\firebase_core\firebase_core_plugin.vcxproj]
C:\Users\XXXX\AndroidStudioProjects\delete_later\build\windows\extracted\firebase_cpp_sdk\include\firebase/variant.h(801,7): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\XXX\AndroidStudioProjects\delete_later\build\windows\plugins\firebase_core\firebase_core_plugin.vcxproj]
C:\Users\XXXX\AndroidStudioProjects\delete_later\build\windows\extracted\firebase_cpp_sdk\include\firebase/variant.h(827,7): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\XXXX\AndroidStudioProjects\delete_later\build\windows\plugins\firebase_core\firebase_core_plugin.vcxproj]
Exception: Build process failed.

I even created a newproject, where the only library I added is firebase_core. This new project also fails to run, with the same error, which means the problem is with the firebase_core library.

Any help is greatly appreciated.

Danish Ajaib
  • 83
  • 1
  • 3
  • 14
  • found any solution? I've got the same issue. – Kiran Aug 03 '23 at 15:59
  • I was able to get it to work by using an older version of firebase_core. If downgrading doesn't work , you probably have other dependencies that depend on firebase_core 2.15.10. – Danish Ajaib Aug 14 '23 at 04:15

1 Answers1

0

I solved this problem by updating the version of Visual Studio. Not VS Code, but Visual Studio and Visual Studio Build Tools.

diyo
  • 11