1

My android Project is working fine without the google place library. I am trying to implement below place library in my project as old one is depricated.

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

After adding above library it is starting to give below errors but without above project just works fine

 Duplicate class com.bumptech.glide.util.pool.StateVerifier$DefaultStateVerifier found in modules classes.jar
 Duplicate class com.google.android.gms.location.places.zza found in modules classes.jar
 Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>
 AAPT: error: duplicate value for resource 'attr/font' with config

How can I avoid above with new place library implementation

Nabin Bhandari
  • 15,949
  • 6
  • 45
  • 59
Mithu
  • 665
  • 1
  • 8
  • 38

1 Answers1

4

It is weird that places API has a dependency on Glide. To prevent conflict, just exclude Glide from Places API as follows:

implementation('com.google.android.libraries.places:places:1.1.0') {
    exclude group: 'com.github.bumptech.glide', module: 'glide'
}
Nabin Bhandari
  • 15,949
  • 6
  • 45
  • 59
  • After adding this bumptech error has gone but below error persists. `Duplicate class com.google.android.gms.location.places.zza found in modules classes.jar AAPT: error: duplicate value for resource 'attr/font' with config app\src\main\res\values\attrs.xml:3:5-6:25: AAPT: error: resource previously defined here app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\value` – Mithu Oct 20 '19 at 10:58
  • It looks like a different error. Making sure that everything is in latest version should fix the problem. Or check these answers: https://stackoverflow.com/q/47668526/5137352 – Nabin Bhandari Oct 20 '19 at 11:09
  • is new place library conflicting with all old library? I am having this problem only when i implement new place library – Mithu Oct 20 '19 at 11:12