opencv android 32bit,libopencv_java3.so is 64-bit instead of 32-bit Android/Eclipse error

Hi,

I am trying to build an App using OpenCV and NDK. The app works fine on my Nexus 5 but when I try it on my Samsung Galaxy S6 I get a message that OpenCV could not be initialized correctly and on the logcat I get the error

E/art(3895): dlopen("/data/app/org.opencv.engine-1/lib/arm64/libopencv_java3.so", RTLD_LAZY) failed: dlopen failed: "/data/app/org.opencv.engine-1/lib/arm64/libopencv_java3.so" is 64-bit instead of 32-bit

Browsing through StackOverflow I figured that this error could be resolved including the library in the apk. So I tried including opencv placing

OPENCV_CAMERA_MODULES:=on

OPENCV_INSTALL_MODULES:=on

in the Android.mk and loading OpenCV with:

static {

if (!OpenCVLoader.initDebug()) {

// Handle initialization error

}

}

like stated in the opencv tutorial page

but I couldn't get it to load OpenCV.

Here is my Android.mk and Application.mk

Android.mk

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

OPENCV_CAMERA_MODULES:=on

OPENCV_INSTALL_MODULES:=on

include /Users/ben/Downloads/OpenCV-android-sdk/sdk/native/jni/OpenCV.mk

LOCAL_MODULE := native gray

LOCAL_SRC_FILES := jni_part.cpp

LOCAL_LDLIBS += -llog -ldl

LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib -llog

include $(BUILD_SHARED_LIBRARY)

Application.mk

APP_STL := gnustl_static

APP_CPPFLAGS := -frtti -fexceptions

APP_ABI := armeabi-v7a

APP_PLATFORM := android-9

Thank you ;)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值