OpenCV error from imported project. How can i resolve the following error, I m unable to resolve for past 2 days and searched lot regarding . I used to import this project (Project)and getting error. **
[2016-05-30 16:36:44 - Dex Loader] Unable to execute dex: Multiple dex files define Lorg/opencv/calib3d/Calib3d; [2016-05-30 16:36:44 - SplashActivity] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lorg/opencv/calib3d/Calib3d;
**
I have tried removing and adding the library file. and clean build , eclipse restart and so on. nothing solves here.
when i run it shows this first and the above: Android Launch: Your project contains error(s), please fix them before running application. In Android Stuido:
Error:Execution failed for task ':java:packageAllDebugClassesForMultiDex'.
java.util.zip.ZipException: duplicate entry: org/opencv/calib3d/Calib3d.class
Update:
apply plugin: 'com.android.application' android { compileSdkVersion 15 buildToolsVersion "23.0.3" defaultConfig { applicationId "com.fingerprintrecognition" minSdkVersion 15 targetSdkVersion 15 ndk { moduleName "nonfree_prebuilt" } } configurations { all*.exclude group: 'com.android.support', module: 'support-v4' } sourceSets.main { jni.srcDirs = [] } defaultConfig { multiDexEnabled true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } } dependencies { compile project(':openCVLibrary2411') compile files('libs/opencv-2.4.9-5.jar') } Thanks.
build.gradlefile?multiDexEnabled false- also move your dependencies to the app-levelbuild.gradlefile. By the way, can you show the app-level gradle file as well?opencvin two places - for instance if thelibsfolder is part of your project - this might confuse things as to which lib/jar to look at. Did you perhaps add theopencv-2.4.9-5.jarthrough the "configure buildpath" route?