Lib libmodpdfium depends on libc++_shared.so. There are known incompatibility issues when linking libc++_shared.so with Unreal Engine built with NDK22+. Please rebuild your dependencies with static libc++!

Hi guys, we are trying to convert a plugin from UE4 to UE5.
For Windows there are no problems, but when building for Android it returns “Unknown error”.
The only useful message is “Lib libmodpdfium depends on libc++_shared.so. There are known incompatibility issues when linking libc++_shared.so with Unreal Engine built with NDK22+. Please rebuild your dependencies with static libc++!”.
We are using the third party library “pdfium” as a dependency of the plugin.
We already tried to update the “.so” files inside the lib folder but nothing changed.
We also tried to check the option “Disable libc++_shared dependency validation in all dependencies” in Unreal project options, which allowed us to build the project, but once installed the apk crashes at launch.
Unfortunately we don’t have enough Android knowledge to understand where exactly the problem is.