Error when linking libnative_camera_r2.2.0.so - QT + OpenCV4Android

asked 2014-02-11 04:50:26 -0500

valorcurse gravatar image

Hi,

I've been trying to run OpenCV4Android 2.4.8 along with QT 5.2 to create an android app, but I got stuck with the following error when deploying the app:

/dalvikvm(16441): dlopen("/data/app-lib/org.app-1/libnative_camera_r2.2.0.so") failed: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "_ZN7android6Camera17setPreviewDisplayERKNS_2spINS_8ISurfaceEEE" referenced by "libnative_camera_r2.2.0.so"...
W/System.err(16441): java.lang.reflect.InvocationTargetException
W/System.err(16441):    at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(16441):    at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err(16441):    at org.qtproject.qt5.android.bindings.QtActivity.loadApplication(QtActivity.java:237)
W/System.err(16441):    at org.qtproject.qt5.android.bindings.QtActivity.startApp(QtActivity.java:634)
W/System.err(16441):    at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:863)
W/System.err(16441):    at android.app.Activity.performCreate(Activity.java:5165)
W/System.err(16441):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1103)
W/System.err(16441):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2419)
W/System.err(16441):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2520)
W/System.err(16441):    at android.app.ActivityThread.access$600(ActivityThread.java:162)
W/System.err(16441):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1366)
W/System.err(16441):    at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err(16441):    at android.os.Looper.loop(Looper.java:158)
W/System.err(16441):    at android.app.ActivityThread.main(ActivityThread.java:5751)
W/System.err(16441):    at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(16441):    at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err(16441):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1083)
W/System.err(16441):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:850)
W/System.err(16441):    at dalvik.system.NativeStart.main(Native Method)
W/System.err(16441): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "_ZN7android6Camera17setPreviewDisplayERKNS_2spINS_8ISurfaceEEE" referenced by "libnative_camera_r2.2.0.so"...
W/System.err(16441):    at java.lang.Runtime.load(Runtime.java:340)
W/System.err(16441):    at java.lang.System.load(System.java:521)
W/System.err(16441):    at org.qtproject.qt5.android.QtNative.loadBundledLibraries(QtNative.java:150)
W/System.err(16441):    at org.qtproject.qt5.android.QtActivityDelegate.loadApplication(QtActivityDelegate.java:410)
W/System.err(16441):    ... 19 more

My .pro file looks like the following:

# Add more folders to ship with the application, here
folder_01.source = qml/app
folder_01.target = qml
DEPLOYMENTFOLDERS = folder_01

# Additional import path used to resolve QML modules in Creator's code model
QML_IMPORT_PATH =

# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp

# OpenCv Configuration
#INCLUDEPATH += /usr/include/opencv
#INCLUDEPATH += /usr/include/opencv2
#INCLUDEPATH += /usr/include
#INCLUDEPATH += /usr/include/opencv2/core

ANDROID_OPENCV = /home/valorcurse/Qt/android/opencv

LIBS += \
$$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_calib3d.a \
$$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_flann.a \
$$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_objdetect.a \
$$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_contrib.a ...
(more)
edit retag flag offensive close merge delete

Comments

Hi, Did you find any solution for this error.

ismail_gz gravatar imageismail_gz ( 2014-09-20 05:25:23 -0500 )edit