首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在模块中发现重复的类com.google.api.client.http.apache.ApacheHttpRequest

在模块中发现重复的类com.google.api.client.http.apache.ApacheHttpRequest
EN

Stack Overflow用户
提问于 2019-05-18 02:46:47
回答 1查看 952关注 0票数 0

我正在尝试迁移,以便为我的安卓应用程序驱动v3应用程序接口,我已经按照https://github.com/gsuitedevs/android-samples/tree/master/drive/deprecation中提供的说明进行了迁移。我收到了依赖项解析错误。

我已经使用了日志中的排除选项中显示的重复类,但它不起作用

我的驱动器api依赖项列表

代码语言:javascript
复制
implementation 'com.google.android.gms:play-services-ads:17.2.0'
    implementation 'com.google.android.gms:play-services-auth:16.0.1'
    implementation 'com.google.http-client:google-http-client-gson:1.29.1'

    implementation('com.google.api-client:google-api-client-android:1.28.0') {
        exclude group: 'org.apache.httpcomponents'
    }

    implementation('com.google.apis:google-api-services-drive:v3-rev99-1.23.0') {
        exclude group: 'org.apache.httpcomponents'
 }

下面是显示的错误行

代码语言:javascript
复制
Duplicate class com.google.api.client.http.apache.ApacheHttpRequest found in modules google-http-client-1.29.1.jar (com.google.http-client:google-http-client:1.29.1) and google-http-client-apache-2.0.0.jar (com.google.http-client:google-http-client-apache:2.0.0)
Duplicate class com.google.api.client.http.apache.ApacheHttpResponse found in modules google-http-client-1.29.1.jar (com.google.http-client:google-http-client:1.29.1) and google-http-client-apache-2.0.0.jar (com.google.http-client:google-http-client-apache:2.0.0)
Duplicate class com.google.api.client.http.apache.ApacheHttpTransport found in modules google-http-client-1.29.1.jar (com.google.http-client:google-http-client:1.29.1) and google-http-client-apache-2.0.0.jar (com.google.http-client:google-http-client-apache:2.0.0)
Duplicate class com.google.api.client.http.apache.ContentEntity found in modules google-http-client-1.29.1.jar (com.google.http-client:google-http-client:1.29.1) and google-http-client-apache-2.0.0.jar (com.google.http-client:google-http-client-apache:2.0.0)
Duplicate class com.google.api.client.http.apache.HttpExtensionMethod found in modules google-http-client-1.29.1.jar (com.google.http-client:google-http-client:1.29.1) and google-http-client-apache-2.0.0.jar (com.google.http-client:google-http-client-apache:2.0.0)
EN

回答 1

Stack Overflow用户

发布于 2019-05-18 05:03:08

查看错误消息:

代码语言:javascript
复制
found in modules google-http-client-1.29.1.jar

它似乎引用了:

代码语言:javascript
复制
implementation 'com.google.http-client:google-http-client-gson:1.29.1'

基于版本号。你有没有试着把这个库也排除在那个工件之外?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56192013

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档