Dynamic link issue: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "fread_unlocked"
Hello,
I have an android app which was using openCV 3.4.5 but now need to add opencv_contrib modules to it. I have tried to build and use either 3.4.8 and 4.1.2 with associated opencv_modules versions. I managed to generate the corresponding libopencv_javaX.so and updated my android project accordingly (but I may lack configuration stuff either in openCV or my project).
Each time my app don't even open and crash on the following dynamic link message: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "fread_unlocked" referenced by "/data/app/...
I am not a java developper, all the app in developped in C++ so I don't have a clue of what is happening at that level apart understanding that there is a link issue with libc++_XXX.so used (both static and shared show the same output behavior).
I am using NDK r20, SDK 26.1.1
Not sure if I missed important config in openCV build or if my android app project miss something (working fine with dowloaded openCV SDK 3.4.5 but missing contrib obviously).
Any help will be greatly apreciated, thx !
I'm not a java developper too but I have done this. May be it can help you
Thx ! Will study your project and see the differences on how you handle the openCV dependency
Thx LBerger, managed to make my project work with 4.1.2 but weirdly not with 3.4.8, seems dependencies might not be handled exactly the same way ?
sorry I use only opencv 4-dev version and my experience in android is weak as a noob
Thx anyway, found out that java folder is not generated for some reason in install folder, guess something is missing in my cfg of opencv build for 3.4.8
to generate opencv I use this
It is a known issue in fact, sdk version too high for 3.4.8, should be 25.2.5 max