Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] gradle – Module exclusion Firestore implementation android Studio

Posted on November 11, 2022 By

Solution 1 :

You may find this stackoverflow post helpful to understand the dependency tree.

the syntax you are using does not match what most documents state : 2 3 4.

your syntax :

implementation('com.google.firebase:firebase-firestore:20.0.0') {
        exclude module: 'gson'
        exclude module: 'com.google.gauva:gauva-jdk5:17.0'
    }

As mentioned in blog:

configurations.implementation {
    exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
}

As mentioned in Thread:

implementation ('com.google.apis:google-api-services-youtube:v3-rev183-1.22.0') {
    exclude group: 'org.apache.httpcomponents'
    exclude group:'com.google.guava'
}

As mentioned in Thread:

configurations.implementation.exclude(group: 'com.google.firebase', module: 'protolite-well-known-types')

Try changing the configuration syntax to get the desired results

configurations.implementation {
  exclude group: 'com.google.gauva', module: 'gauva-jdk5'
} 

or

configurations.implementation.exclude(group: 'com.google.gauva', module: 'gauva-jdk5') 

Problem :

I have been using realtime Firebase for my app for some time .I need to add Firestore to my project . when adding firestore , I have a duplication error . I would like to exclude modules from firestore and not from other libs .
I can not identify which module should be removed besides gson that was also duplicated.

implementation(‘com.google.firebase:firebase-firestore:24.1.2’){
exclude module: ‘gson’,
exclude module:????
}
It seems very close or a duplicate of some other questions but none of the given answsers in previous questions worked

I can not give all gradle because file is very large but main google elements are :

implementation 'com.google.firebase:firebase-database:20.0.0'
implementation 'com.google.firebase:firebase-auth:20.0.0'
implementation 'com.google.firebase:firebase-core:20.0.0'
implementation 'com.google.firebase:firebase-functions:20.0.0'
implementation 'com.google.firebase:firebase-storage:20.0.0'

implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'

implementation('com.google.firebase:firebase-firestore:20.0.0') {
    exclude module: 'gson'
    exclude module: 'com.google.gauva:gauva-jdk5:17.0'
}


implementation 'com.google.api-client:google-api-client-android:1.23.0' exclude module: 'httpclient' exclude module: 'com.google.gauva:gauva-jdk5:17.0'

I supppose issue comes from
implementation files(‘libsdeeparteffects-android-client-1.0.0-jar-with-dependencies.jar’) but i can not really test it

Duplicate class com.google.common.util.concurrent.WrappingExecutorService found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)
Duplicate class com.google.common.util.concurrent.WrappingExecutorService$1 found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)
Duplicate class com.google.common.util.concurrent.WrappingScheduledExecutorService found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)
Duplicate class com.google.common.util.concurrent.package-info found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)
Duplicate class com.google.common.xml.XmlEscapers found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)
Duplicate class com.google.common.xml.package-info found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)
Duplicate class com.google.thirdparty.publicsuffix.PublicSuffixPatterns found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)
Duplicate class com.google.thirdparty.publicsuffix.PublicSuffixType found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)
Duplicate class com.google.thirdparty.publicsuffix.TrieParser found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)

Comments

Comment posted by Duplicate class com.google.common.util.concurrent.ListenableFuture found in modules guava-20.0.jar (com.google.guava:guava:20.0)

Does this answer your question?

READ  [FIXED] android - Confusion on the defaultValue migration requirement for upgrade after Room 2.1.0
Powered by Inline Related Posts

Comment posted by it75

Thanx, i tried both answers given for this questions and none worked . Weird to have this issue just with firestore and not realtime firebase

Comment posted by stackoverflow.com/a/61982002/15774176

can you share your build.gradle file and check for the link :

Comment posted by it75

Hi, issue seems very similar but just adding elements in the configurations part makes the build fail .I don t which causes duplication issues, i supsect an external modul deepart, but i can not confirm . i can not exclude anything from this module i guess

Comment posted by Divyani Yadav

is this issue resolved by exclusion ?

Comment posted by it75

It was not too clear for me what it really changed but anyway i tried all combinaisons and none worked

Comment posted by Divyani Yadav

is still the log showing same?

Comment posted by it75

All the tests give different errors but basically there are duplicate elements issues

Android Tags:android-studio, google-cloud-firestore, gradle

Post navigation

Previous Post: [FIXED] Android ACTION_VIEW intent is not opening urls in non-browser apps like twitter and instagram
Next Post: [FIXED] android – Check if activity is active, and if active pass data from service to activity?

Related Posts

[FIXED] Android updating file in background Android
[FIXED] android – Not able to hide toolbar on scrolling Fragment layout Android
[FIXED] How make a SMB connection through Network object in Android? Android
[FIXED] gradle – Android: set package name depending on device running on Android
[FIXED] android – I got a problem when I’m pressing the “back” button on my phone Android
[FIXED] android – Getting photo dimension of locally stored photo Android

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • What is a good substitute for condensed milk?
  • ¿Como el cuerpo te avisa cuando te va a dar un infarto?
  • What is the luxury brand of Jaguar?
  • Who is Big poppa baseball player?
  • What material are foam runners?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme