Ask Your Question
0

No Implementation Found Error in OpenCv Android Tutorial 4

asked 2012-11-22 12:43:33 -0600

Wedontplay gravatar image

Hi, i'm trying to use opencv for android. I installed the sdk, tested a few tutorial without problems. Now i'm trying to use the Ndk to write OpenCv in C++.

I just can't run Tutorial 3 and Tutorial 4 beacuse the call:

public native void FindFeatures(long matAddrGr, long matAddrRgba);

Throw a runtime error:

W/dalvikvm(2537): No implementation found for native Lorg/opencv/samples/tutorial4/Sample4Mixed;.FindFeatures:(JJ)V

E/AndroidRuntime(2592): java.lang.UnsatisfiedLinkError: Native method not found: org.opencv.samples.tutorial3.Sample3Native.FindFeatures:(JJ)V

I tried everything... i also added

libopencv_java.so

directly in /jni folder and edited the Android.mk file this way:

include $(CLEAR_VARS)

LOCAL_MODULE := opencv_java

LOCAL_SRC_FILES := libopencv_java.so

include $(PREBUILT_SHARED_LIBRARY)

any suggestion please?

Gabriele

edit retag flag offensive close merge delete

Comments

Having the same issue. Did you find any solution for this?

zshn25 gravatar imagezshn25 ( 2016-03-31 00:28:01 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
2

answered 2012-11-23 00:57:01 -0600

UnsatisfiedLinkError exception means that native libraries with jni code was not found. There are two possible reason. First, you forgot to build native part of samples, and there is no any *.so files in your package. To solve the issue you need to run ndk-build command from project folder. Second, you use platform that is differ from armeabi-v7a. All samples were configured for build for most popular platform armeabi-v7a. To solve the issue you need to edit jni/Application.mk file of samples and set APP_ABI variable to value "all". In this case ndk-build builds native part with jni code for all supported platforms.

edit flag offensive delete link more

Comments

I tried APP_ABI := all and APP_ABI := armeabi. As an additional details i get this in the console:

Install : libmixed_sample.so => libs/armeabi-v7a/libmixed_sample.so Install : libopencv_java.so => libs/armeabi-v7a/libopencv_java.so

Wedontplay gravatar imageWedontplay ( 2012-11-23 03:50:05 -0600 )edit
0

answered 2012-11-22 13:32:32 -0600

Karl gravatar image

updated 2012-11-22 13:33:09 -0600

Are you using an emulator? If yes, Tutorial 3 and 4 use OpenCV Native Camera which may not work with emulator.

edit flag offensive delete link more

Comments

Yes i use an emulator, the problem is not the camera. The camera works fine and i can for example use the canny filter without problem... i think the problem is in the library linking

Wedontplay gravatar imageWedontplay ( 2012-11-22 16:10:49 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2012-11-22 12:43:33 -0600

Seen: 7,093 times

Last updated: Nov 23 '12