Get Start
Get SDK
get
OpenCV SDK
-> Downloadthis project used
OpenCV 2.4.13.2
unzip SDK to
D:/
or other directory. e.g.D:\myCode\OpenCV-android-sdk
New a Android Studio APP Project
- build a New Project
- right click
app -> Folder -> JNI Folder -> accept
Change Folder Location
-> New Folder Location:src/main/jniLibs
- Go to your
OpenCVSDK folder
and COPYarmeabi
、armeabi-v7a
、mips
、x86
- right click
jniLibs
Folder-> Paste -> OK
import Module
- File -> New -> Import Module -> choose your OpenCV Module ( e.g.
D:\myCode\OpenCV-android-sdk\sdk\java
) and Import it.
- File -> New -> Import Module -> choose your OpenCV Module ( e.g.
- File -> Projuct Structure.. -> app -> Dependencies -> Add -> 3. Module Dependency -> choose OpenCV Module.
- modify build.gradle(APP)
sourceSets { main { jni.srcDirs = ['src/main/jni', 'src/main/jniLibs/'] } }
tosourceSets { main { jniLibs.srcDirs = ['src/main/jni', 'src/main/jniLibs/'] } }
Now you can Run your APPs.