Mayur Satav
Mayur Satav

Reputation: 1102

Showing no OpenCV module in dependancies in Android Studio

I tried many tutorials and blogs for Setting up OpenCV Android Library on Android Studio some of them are here

A Beginner’s Guide to Setting up OpenCV Android Library on Android Studio

Add OpenCV library into Android Studio

OpenCV in Android Studio

but i am unable to configure it according to above solutions

at start when i try to import module from /OpenCV-android-sdk/sdk/java android studio not showing module name edit box and hence i have to add "java" as a OpenCV module name

enter image description here

OK after importing module with the name of java we have to add dependencies but in add module dependencies not showing any module name java or anything

enter image description here

Guys anyone know how can i resolve this issue or any proper steps for OpenCV configuration in Android studio

I am using

Android Studio -4.0

opencv-4.3.0-android-sdk

Upvotes: 8

Views: 777

Answers (1)

The Jimit
The Jimit

Reputation: 31

First Screenshot: Android Studio may have removed that option in new version.

Second Screenshot: You can solve issue 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'
        }
    }
}

Change apply plugin: 'com.android.application' to apply plugin: 'com.android.library'

and comment out the following line :

applicationId "org.opencv"

Upvotes: 3

Related Questions