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
  • 291,719
  • 55
  • 540
  • 600

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,120
  • 5
  • 20
  • 39
  • Thank you! It's working implementation ('com.google.cloud:google-cloud-dialogflow:0.67.0-alpha') { exclude group :"org.threeten", module: "threetenbp" } – 아이티엘ITL Mar 06 '20 at 01:18