Couldn't load xfeature2D from loader dalvik.system.PathClassLoader

asked 2017-06-26 01:51:37 -0600

open_ranger gravatar image

updated 2017-06-27 03:11:04 -0600

I am trying to include xfeature2d in my Android App and got the error message java.lang.UnsatisfiedLinkError: Couldn't load xfeature2D from loader dalvik.system.PathClassLoader

I guess it's probably because the library path isn't set correctly.How do I correct this issue?

Addon: After I bit of research this is what I find out.Basically if I want to use function like SIFT or SURF in my android app,I need to compile opencv-android-sdk manually with extra opencv_contrib_modules,and I need to install the compiled new opencv-manger to the device.

In the command terminal enter

    python /home/WXH/Desktop/opencv-3.2.0/platforms/android/build_sdk.py /home/WXH/Desktop/opencv-3.2.0/build /home/WXH/Desktop/opencv-3.2.0 --sdk_path=/home/WXH/Desktop/aosp/sdk --ndk_path=/home/WXH/Desktop/aosp/sdk/ndk-bundle --extra_modules_path=/home/WXH/Desktop/opencv-3.2.0/contrib/modules

Here is where I got stuck

[1509/1597] Generating OpenCV Android library project. SDK target: lib_target_sdk_target-NOTFOUND
FAILED: cd /home/WXH/Desktop/opencv-3.2.0/build/o4a/modules/java && /usr/bin/cmake -E remove   /home/WXH/Desktop/opencv-3.2.0/build/o4a/build.xml/home/WXH/Desktop/opencv-3.2.0/build/o4a/local.properties /home/WXH/Desktop/opencv-3.2.0/build/o4a/proguard-project.txt /home/WXH/Desktop/opencv-3.2.0/build/o4a/project.properties && /usr/bin/cmake -E copy_if_different /home/WXH/Desktop/opencv-3.2.0/build/o4a/modules/java/AndroidManifest.xml /home/WXH/Desktop/opencv-3.2.0/build/o4a/AndroidManifest.xml && /home/WXH/Desktop/aosp/sdk/tools/android --silent create lib-project --path "/home/WXH/Desktop/opencv-3.2.0/build/o4a" --target "lib_target_sdk_target-NOTFOUND" --name OpenCV --package org.opencv 2>"/home/WXH/Desktop/opencv-3.2.0/build/o4a/modules/java/create_lib_project.log" && /usr/bin/cmake -E copy_if_different /home/WXH/Desktop/opencv-3.2.0/build/o4a/modules/java/AndroidManifest.xml /home/WXH/Desktop/opencv-3.2.0/build/o4a/AndroidManifest.xml
*************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
*************************************************************************
Invalid or unsupported command "--silent create lib-project --path /home/WXH/Desktop/opencv-3.2.0/build/o4a --target lib_target_sdk_target-NOTFOUND --name OpenCV --package org.opencv"

Traceback (most recent call last):

edit retag flag offensive close merge delete

Comments

This is a stupid website I spent 2 hours typing my solution to my own question (so that other people can see and I can keep a record myself).Then it tells me I need to wait for 2days to answer my own question,what is worse it all my typewritings are gone WTF!!! If I can't post it somehow dont enable the answer typing in the first place,what a waste of time!!!

open_ranger gravatar imageopen_ranger ( 2017-06-27 11:34:35 -0600 )edit

This is a stupid website I spent 2 hours typing my solution to my own question (so that other people can see and I can keep a record myself).Then it tells me I need to wait for 2days to answer my own question,what is worse it all my typewritings are gone WTF!!! If I can't post it somehow dont enable the answer typing in the first place,what a waste of time!!!

open_ranger gravatar imageopen_ranger ( 2017-06-27 11:35:43 -0600 )edit