OpenCV-Contrib in Android Application


I am currently trying to implement object tracking in an Android application using Dart’s FFI and OpenCV-contrib’s tracking modules. I have built opencv 4.9.0 with the contrib module using the script and have a .so file. However when I try and run the app, the opencv code seems to error out and I get the following error message:

Failed to load dynamic library ‘’: dlopen failed: cannot locate symbol “_ZN2cv6legacy8tracking12TrackerMOSSE6createEv”.

This only occurs when I try to use on of the trackers from the Tracking module, but if I use TrackerMIL from the video module it seems to work fine.

I was wondering if anyone had tried this before, or knows how to fix this error? Thanks in advance!