bender
bender

Reputation: 85

Unsatified Link Error: Android OpenCV

I followed this guide:

http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html

but am still getting this error:

E/AndroidRuntime(916): java.lang.UnsatisfiedLinkError: Couldn't load opencv_java248 from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.smartlab-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.smartlab-2, /system/lib]]]: findLibrary returned null

When I call this line:

System.loadLibrary( Core.NATIVE_LIBRARY_NAME );

Upvotes: 0

Views: 1287

Answers (1)

Rui Marques
Rui Marques

Reputation: 8904

Aren't you following this tutorial instead?

The one you linked does not have the line:

System.loadLibrary( Core.NATIVE_LIBRARY_NAME );

And it says:

Note the call to System.loadLibrary(Core.NATIVE_LIBRARY_NAME). This command must be executed exactly once per Java process prior to using any native OpenCV methods. If you don’t call it, you will get UnsatisfiedLink errors. You will also get errors if you try to load OpenCV when it has already been loaded

Upvotes: 1

Related Questions