Zar Saeed
Zar Saeed

Reputation: 110

duplicate entry of library gradle causing application not run

I searched alot but not found any solution of my problem, i tried to run my app on any device and i got this error:

enter image description here

it's throwing an error with com.github.bumptech.glide:glide:3.5.2 ,but it's used only single time how the classes of it got duplicate i run this app before with the same dependencies with out any trouble but suddenly this error appear while i run the app.

app.gradle file

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion '25.0.3'

defaultConfig {
    applicationId "info.androidhive.firebase"
    minSdkVersion 19
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

 dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.android.support:design:25.1.0'
compile 'com.firebaseui:firebase-ui-database:1.1.1'
compile 'com.firebaseui:firebase-ui-storage:1.1.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.github.bumptech.glide:glide:3.5.2'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.crystal:crystalrangeseekbar:1.1.1'
testCompile 'junit:junit:4.12'
}

 apply plugin: 'com.google.gms.google-services'

Upvotes: 0

Views: 1232

Answers (2)

Amir Dora.
Amir Dora.

Reputation: 2717

Browse to your project's "libs" directory and remove redundant "glide.x.x" which is causing the error due to redundancy.

Upvotes: 1

sumit
sumit

Reputation: 1087

Try putting this line :

enforceUniquePackageName false

after buildtoolVersion in your gradle

Upvotes: 0

Related Questions