Ask Your Question

How to initialize OpenCV libs on Android?

asked 2015-02-21 13:40:07 -0500

bsm gravatar image

I'm using android studio, and I managed to get my application to build by editing my build scripts and copying the sdk library folders into my project. Autocomplete and building works. However, I get the following runtime error:

java.lang.UnsatisfiedLinkError: Native method not found

I did some research and it appears that the libraries need to be initialized first. How do I do this?

edit retag flag offensive close merge delete


"it appears that the libraries need to be initialized first. " - yes, that's true.

basically, you can't call any opencv related code, until the c++ native libs finished loading.

could you edit your question again, and show (some) of your code, so we know, where to hook in ?

berak gravatar imageberak ( 2015-02-21 13:50:45 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-03-04 17:59:25 -0500

bsm gravatar image

The answer was quite simple: You must use OpenCVLoader.initDebug() before calling into any OpenCV libs.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-02-21 13:40:07 -0500

Seen: 979 times

Last updated: Mar 04 '15