Ask Your Question
0

Where is the lib file **mixed_sample.so** ?

asked 2017-06-14 12:31:30 -0600

vvyogi gravatar image

I'm trying to compile the tutorial-2-mixedprocess application in android, this application comes with the sdk. But my application crashes when it tries to load mixed_sample

                    // Load native library after(!) OpenCV initialization
                    System.loadLibrary("opencv_java3");
                    Log.d(TAG, "Loaded the opencv");        //This line appears on the monitor

                    System.loadLibrary("mixed_sample");   // C-R-A-S-H z z z

I looking inside the libs directory that came with opencv-3.2.0-android-sdk.zip but libmixed_sample.so is nowhere to be found.

Where to find this file?

Is there any relation between this libfile and the opencv-manager?

edit retag flag offensive close merge delete

Comments

it should have been built from jni as part of this sample . maybe you do not have JNI support configured correctly in your dev environment ?

berak gravatar imageberak ( 2017-06-14 23:18:11 -0600 )edit

@berak I am using android-studio, so I had to do a bit of shuffling to make the project compile. And it seems opencv_java3 load is working.
Can you point me to a source where I can see the correct config for jni in android-studio (uses gradle build system).

vvyogi gravatar imagevvyogi ( 2017-06-14 23:58:07 -0600 )edit

sorry, but i can't. (no more using android at all)

berak gravatar imageberak ( 2017-06-15 00:04:34 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-08-31 03:37:56 -0600

vvyogi gravatar image

updated 2018-08-31 03:38:44 -0600

I figured out the problem earlier but posting now so that it may help people facing similar issues.

By default the android-studio projects are configured to use CMake, however, for openCV4Android we need to use the Make (ndk based) build system.

To solve my problem I had to change the gradle settings to use the ndk instead of the Cmake system. The second answer mentioned here very nicely explains how to do it.

Thats all.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-06-14 12:28:25 -0600

Seen: 394 times

Last updated: Aug 31 '18