Videep Singhal
Videep Singhal

Reputation: 5

Places API setup is giving an error during setup in build.gradle

As soon as I add

compile 'com.google.android.libraries.places:places:1.0.0'

It starts giving me error

Cause: duplicate entry: com/bumptech/glide/GeneratedAppGlideModule.class

My build.gradle code is

apply plugin: 'com.android.application'

    android {
        compileSdkVersion 26
        buildToolsVersion "26.0.0"
        defaultConfig {
            applicationId "com.videep.carpool"
            minSdkVersion 16
            targetSdkVersion 26
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            multiDexEnabled true
            configurations.all {
                resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
            }

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

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })

        //noinspection GradleCompatible
        compile 'com.android.support:appcompat-v7:25.3.1'
        compile 'com.android.support.constraint:constraint-layout:1.0.2'
        compile 'com.google.firebase:firebase-core:11.0.4'
        compile 'com.google.firebase:firebase-database:11.0.4'
        compile 'com.google.firebase:firebase-auth:11.0.4'
        compile 'com.google.firebase:firebase-storage:11.0.4'
        compile 'com.firebase:geofire-android:2.1.1'
        compile 'com.google.android.gms:play-services:11.0.4'
        compile 'com.github.bumptech.glide:glide:4.3.1'
        compile 'com.android.support:design:26.1.0'
        compile 'com.android.support:cardview-v7:26.1.0'
        compile 'com.github.jd-alexander:library:1.1.0'
        testCompile 'junit:junit:4.12'
        compile 'com.google.android.libraries.places:places:1.0.0'

    }












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

Upvotes: 0

Views: 130

Answers (2)

Samir Bhatt
Samir Bhatt

Reputation: 3261

Add Dependencies for Glide with the latest version.

 repositories {
  mavenCentral()
  google()
}

dependencies {
  implementation 'com.github.bumptech.glide:glide:4.9.0'
  annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
}

This issue is in glide library. It is fixed in latest version. Please check link for reference.

Upvotes: 1

Sasi Kumar
Sasi Kumar

Reputation: 13358

Use the latest version of glide. This issue is fixed.

dependencies {
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
}

for more detail refer here Glide

Upvotes: 0

Related Questions