gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 05:35:57 31 4
gpt4 key购买 nike

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

我使用了登录排除选项中显示的重复类,但它没有工作

我的驱动器 api 依赖项列表

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'
}

以下是显示的错误行
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)

最佳答案

查看错误消息:

found in modules google-http-client-1.29.1.jar

它似乎引用:
implementation 'com.google.http-client:google-http-client-gson:1.29.1'

根据版本号。您是否也尝试将库从该人工制品中排除?

关于android - 在模块中发现重复的类 com.google.api.client.http.apache.ApacheHttpRequest,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56192013/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com