Ask Your Question
0

How to initialize OpenCV libs on Android?

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

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

Comments

"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 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

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

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

Question Tools

1 follower

Stats

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

Seen: 1,057 times

Last updated: Mar 04 '15