I am trying to use an insecure module with OpenCV on Android. I am following this answer https://stackoverflow.com/a/2126162/2326 , but I have a hard time understanding it since this is my first app with Android and NDK.
At the moment, OpenCV (without proprietary) is working on my application, and I use it in C ++ code with NDK and JNI. I am having problems editing my current Android.mk and Application.mk files in response to compilation without crashes.
Here are my Android.mk and Application.mk files with the structure of my project.
Android.mk:
LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS)
Application.mk:
APP_STL := gnustl_static APP_CPPFLAGS := -frtti -fexceptions APP_ABI := armeabi-v7a APP_PLATFORM := android-16
Project Structure: 
My project crashes with the line #include <opencv2/nonfree/nonfree.hpp> in my jni.h file, so I'm trying to import a non-free module.
So, as I said, I am trying to fulfill the answer linked above, but I have problems.
In the answer:
Creating a proprietary module:
Step 1: I just copy the files.
Step 2: I do not understand where I should create this folder, in my application or on my computer?
Step 3: Here is the big problem, I don’t know how I can combine the Android.mk and Application.mk files provided in response to mine. Also, I don't understand the line " cd in the libnonfree project libnonfree and type ndk-build to build libnonfree.so. "
To “create an example application” I have not been to this part yet, but I figured I did not need to do this. I can just use OpenCV with my application, except that the line #include <opencv2/nonfree/nonfree.hpp> will work.
I tried to make this question clear, if you need more information, I will gladly edit it.
java c ++ android opencv android-ndk
Megatron300
source share