我用了Picasso作为我的应用程序项目和聊天库的依赖项
这是我在编译代码时遇到的错误:
Program type already present: org.apache.http.auth.AuthSchemeFactory Message{kind=ERROR, text=Program type already present:
org.apache.http.auth.AuthSchemeFactory, sources=[Unknown source file], tool name=Optional.of(D8)}
那么如何对两个项目使用相同的依赖?
---- Root project----
|
|
---app
|
---chat library
编辑星期六 - 2018 年 4 月 14 日
在 app>libs 文件夹中存在以下 jar
文件:
- httpclient-4.3.6
- httpcore-4.3.3
- httpmime-4.3.6
最佳答案
我遇到了同样的问题。首先,您可以看到名为 D8 的新 dexer 正在运行。它似乎仍处于实验阶段,因此您可以通过以下方式在 gradle.properties 文件中暂时关闭它:
android.enableD8=false
在 blog announcement 中查看有关 D8 的更多详细信息
然后您可以看到更详细的错误消息,这让我想到了以下解决方案:
implementation("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.1") {
exclude group: 'org.apache.oltu.oauth2', module: org.apache.oltu.oauth2.common'
}
关于android - 程序类型已经存在 : org. apache.http.auth.AuthSchemeFactory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49834773/