get trouble to link my native library after add OpenCV 2.3.1 as library

47 views
Skip to first unread message

Amidofu Lue

unread,
Jul 11, 2012, 6:07:33 PM7/11/12
to android...@googlegroups.com
After suffer for my previous problem ( https://groups.google.com/forum/?fromgroups#!topic/android-opencv/LIixgr-iYSs) for entire day, I switch to use OpenCV 2.3.1 but I got another problem. If I don't add the OpenCV library it can load my native library and works well, but if I add OpenCV library and just create a Mat object, it can't load my native lib (it throws UnsatisfiedLinkError: couldn't load nativeLib: find library returned null). I use HTC EVO 3D, build by ndk-r8. Thank you.

Amidofu Lue

unread,
Jul 11, 2012, 6:30:43 PM7/11/12
to android...@googlegroups.com
BTW, my native function doesn't call any OpenCV related functions

Amidofu Lue

unread,
Jul 12, 2012, 5:39:42 PM7/12/12
to android...@googlegroups.com
Solved. Just need to change
"APP_ABI := armeabi" to "APP_ABI := armeabi-v7a" in Android.mk

Thank you

Amidofu Lue於 2012年7月11日星期三UTC-7下午3時30分43秒寫道:

Amidofu Lue

unread,
Jul 13, 2012, 4:54:53 PM7/13/12
to android...@googlegroups.com
The same error appears again... Is it because I use 64-bit Linux?

Amidofu Lue於 2012年7月12日星期四UTC-7下午2時39分42秒寫道:

Amidofu Lue

unread,
Jul 14, 2012, 5:44:03 PM7/14/12
to android...@googlegroups.com
never mind, some problems are in my native code, but the ndk compiler doesn't complain about it...

Amidofu Lue於 2012年7月14日星期六UTC+8上午4時54分53秒寫道:

Amidofu Lue

unread,
Jul 16, 2012, 6:02:18 PM7/16/12
to android...@googlegroups.com
Ok...it seems happen occasionally, not sure what causes it. Sometimes I can eliminate this problem by adding some spaces or new lines in native code, but sometime I just can't get rid of it.

Amidofu Lue於 2012年7月15日星期日UTC+8上午5時44分03秒寫道:
Reply all
Reply to author
Forward
0 new messages