Ask Your Question

How the is copy to the apk when it is used the static lib type?

asked 2012-07-30 07:16:34 -0500

Weblucas gravatar image

updated 2012-07-31 02:32:21 -0500

Andrey Pavlenko gravatar image

I compile the jni part of my code, the camera libs ares copied, but the is ways missing. I do this copy by hand then everthing works...


LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

include ../
include $(OPENCV_MK_PATH)

LOCAL_MODULE    := olah
LOCAL_CFLAGS    := -Werror
LOCAL_SRC_FILES := part_jni.cpp 
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../../libs/
LOCAL_LDLIBS    += -llog -ldl -lGLESv2

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2012-07-31 02:43:59 -0500

Andrey Pavlenko gravatar image

When you use static OpenCV linking via


You don't need the OpenCV code is embedded into your jni library via "*.a" files from the OpenCV SDK (look into OpenCV-2.4.2-android-sdk/sdk/native/libs/armeabi-v7a/ content). This approach increases your APK size (in worst case you'll have to keep 3 copies of OpenCV code for armeabi, armeabi-v7a and x86).
We recommend use of OpenCV Manager instead to share the same OpenCV binaries across all app-s (slides, tutorial).

edit flag offensive delete link more

answered 2012-12-14 03:05:39 -0500

V.G. gravatar image

If you believe, that this issue has been resolved, could you please accept the most appropriate answer (even if it's your own one) and close this question. It would greatly improve navigation and overall experience with OpenCV Q&A.


edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2012-07-30 07:16:34 -0500

Seen: 4,139 times

Last updated: Dec 14 '12