【问题标题】:Duplicated classes found in modules classes在模块类中发现重复的类
【发布时间】:2020-03-05 19:12:31
【问题描述】:

我添加了一个对话框流库,出现了这个错误。

这个错误在其他项目中也是一样的。

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)

我尝试过的代码

    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

删除

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

并使缓存失效

build.gradle file on Github

【问题讨论】:

标签: java android


【解决方案1】:

在您的排除配置中,您没有定义 group 名称并且 module 名称被错误地传递。

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

我的完整答案是here

【讨论】:

  • 谢谢!它正在执行('com.google.cloud:google-cloud-dialogflow:0.67.0-alpha'){ exclude group :"org.threeten", module: "threetenbp" }
猜你喜欢
  • 1970-01-01
  • 2019-11-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-02-07
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多