Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue in Adding Module dependency for OpenCv

I am trying to add Module Dependency for Open Cv.

For that I have downloaded latest OpenCv library from the below link : https://sourceforge.net/projects/opencvlibrary/files/opencv-android/3.4.3/

Then, In Android Studio, I have done as below :

File > New > Import Module

In this way, I have imported a module/directory for OpenCv.

Now, I have to add Module Dependency for the added module. To do so I am trying to do as below :

File > Project Structure > Dependencies > + > Module Dependency

But, It showing me: Select at least one module

What might be the issue?

like image 595
Jaimin Modi Avatar asked Jul 16 '19 05:07

Jaimin Modi


1 Answers

It's Solved by editing build.gradle of Opencv as below :

apply plugin: 'com.android.library'

android {
    compileSdkVersion 28
    buildToolsVersion "28.0.3"

    defaultConfig {
        //applicationId "org.opencv"
    }

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

Changed apply plugin: 'com.android.library' from apply plugin: 'com.android.application'

and

Commented below line :

applicationId "org.opencv"

like image 82
Jaimin Modi Avatar answered Nov 04 '22 01:11

Jaimin Modi