Ask Your Question

noamiko's profile - activity

2013-02-07 02:12:44 -0600 received badge  Supporter (source)
2013-01-07 16:36:41 -0600 commented question problem using cvBlobsLib with Android

OK, I found a solution but it doesnt use the static library way. Instead, I copied the source files into my project and compiled them as a shared library.

The compilation takes some time now, but at least it works...

If someone knows how to do it statically I will be happy to know what am I missing...

2013-01-07 03:21:43 -0600 received badge  Organizer (source)
2013-01-06 17:33:50 -0600 received badge  Editor (source)
2013-01-06 17:31:46 -0600 asked a question problem using cvBlobsLib with Android

Hi everyone, I am having problems using cvBlobsLib with my Android app. I am using Eclipse with NDK.

I have downloaded the library cvBlobsLib, compiled it successfully using eclipse and created the file libcvblobslib.a

When trying to use the libcvblobslib.a file in my project (in Eclipse), I am getting an error that says:

"Archive for required library: 'jni/cvblobslib_headers/libcvblobslib.a' in project 'MyProject' cannot be read or is not a valid ZIP file".

I cant figure out what the problem is... I added the libcvblobslib.a file to the build path, and all of the header files, together with the libcvblobslib.a are under the path jni/cvblobslib_headers/

I am able to use the openCV library without the cvBlobsLib, so I know that all the paths of the ndk are correct.

my android.mk is:

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := cvBlobsLib
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/cvblobslib_headers/
LOCAL_SRC_FILES := cvblobslib_headers/libcvblobslib.a
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)
include ../../sdk/native/jni/OpenCV.mk
LOCAL_MODULE    := native_sample
LOCAL_SRC_FILES := jni_part.cpp 
LOCAL_STATIC_LIBRARIES = cvBlobsLib
LOCAL_LDLIBS +=  -llog -ldl
include $(BUILD_SHARED_LIBRARY)

And my Application.mk is :

APP_STL := gnustl_static
APP_CPPFLAGS := -frtti -fexceptions
APP_ABI := armeabi-v7a x86
APP_PLATFORM := android-11

PLEASE HELP!