1

I added a dialogflow library and this error appears.

This error was the same in other projects.

Duplicate class org.threeten.bp.Clock found in modules threetenbp-1.3.7-no-tzdb-no-tzdb.jar 
(org.threeten:threetenbp:1.3.7) and threetenbp-1.3.7.jar (org.threeten:threetenbp:1.3.7)
Duplicate class org.threeten.bp.Clock$FixedClock found in modules threetenbp-1.3.7-no-tzdb-no- 
tzdb.jar (org.threeten:threetenbp:1.3.7) and threetenbp-1.3.7.jar (org.threeten:threetenbp:1.3.7)
Duplicate class org.threeten.bp.Clock$OffsetClock found in modules threetenbp-1.3.7-no-tzdb-no- 
tzdb.jar (org.threeten:threetenbp:1.3.7) and threetenbp-1.3.7.jar (org.threeten:threetenbp:1.3.7)

the code I tried

    configurations {
    all*.exclude module: 'org.threeten.bp' //
}

    implementation ('com.google.cloud:google-cloud-dialogflow:0.117.0-alpha') {
    exclude group :"org.threeten.bp"
}

android.enableJetifier=true
android.useAndroidX=true

Delete

//com.jakeewharton.threvenabp:threvenabp:1.1.1'

and invalidate caches

build.gradle file on Github

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614

1 Answers1

3

in your exclude configuration you didn't define group name and module name was wrongly passed.

configurations {
    all{
       exclude group :"org.threeten", module: "threetenbp"
    }
}

My Complete answer is here

A Farmanbar
  • 4,381
  • 5
  • 24
  • 42