Ask Your Question

Tutorial for open cv integration in Android Studio

asked 2016-06-02 08:10:24 -0600

I want to use open cv in my project. I am using Android Studio for buiding my project. But all tutorials of open cv that I found uses eclipse as there build environment. Also I want to know that those .mk files are only available in eclipse or also in Android Studio as I searched my entire project directory but I can't find these files

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-06-02 08:59:09 -0600

essamzaky gravatar image

Here it's a youtube vedio to setup openCV SDK in Andriod Studio project

Vedio Tutorial

edit flag offensive delete link more


with that tutorial I am not able to init opencv it always enter else block

Vivek Mishra gravatar imageVivek Mishra ( 2016-06-02 12:36:57 -0600 )edit

when i change the build.gradle file according to video

android { compileSdkVersion 23 buildToolsVersion "23.0.2"

defaultConfig {
    minSdkVersion 8
    targetSdkVersion 23

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'


I get the following error :

"Failed to find Build Tools version 23.0.2" Install Build Tools 23.0.2 and sync project

Instead of using the "Install Build..." option , can i find out the values of my current installation and substitute ? In other words, how do i find out the version of buildTools , I currently have and work with that ? Thank you for your time and help

codeHustla72 gravatar imagecodeHustla72 ( 2016-07-13 06:23:01 -0600 )edit

nevermind, answered my own question : under Project view > Right click on <project name=""> open module dependencies > Under Modules > app > the drop down for Build Tools Version only had 2 options - 23.0.1, and 24.0.0. So in the build.gradle file I changed the value for buildToolsVersion to 23.0.1. Then it gave me a warning saying "BuildToolsVersion 23.0.1 is old.Recommend changing to 23.0.2. So I installed 23.0.2, and changed the build.gradle file for "openCVLibrary310" . And everything compile fine after that. Thank you.

codeHustla72 gravatar imagecodeHustla72 ( 2016-07-13 06:39:35 -0600 )edit

Question Tools



Asked: 2016-06-02 08:10:24 -0600

Seen: 317 times

Last updated: Jun 02 '16