gpt4 book ai didi

android - 发布到 Google Play 并添加到库以 gradle 时出错

转载 作者:行者123 更新时间:2023-11-29 23:02:09 25 4
gpt4 key购买 nike

我想将我的应用发布到 Google PLay错误:“我们发现该应用程序使用旧版本的 Google Play Developer API。从 2019 年 12 月 1 日起,将停止对该 API 版本 1 和 2 的支持。在此日期之前将其更新到版本 3。阅读更多 .. ”我发现,如何修复它,我需要 gradle 这个库

implementation 'com.google.apis:google-api-services-androidpublisher:v3-rev95-1.25.0'

但是当我构建 APK 时,studio 显示错误

<issue
id="DuplicatePlatformClasses"
severity="Fatal"
message="`httpclient` defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don&apos;t have the same problem (for example, for `httpclient` use `HttpUrlConnection` or `okhttp` instead), or repackaging the library using something like `jarjar`."
category="Correctness"
priority="8"
summary="Duplicate Platform Classes"
explanation="There are a number of libraries that duplicate not just functionality of the Android platform but using the exact same class names as the ones provided in Android -- for example the apache http classes. This can lead to unexpected crashes.&#xA;&#xA;To solve this, you need to either find a newer version of the library which no longer has this problem, or to repackage the library (and all of its dependencies) using something like the `jarjar` tool, or finally, rewriting the code to use different APIs (for example, for http code, consider using `HttpUrlConnection` or a library like `okhttp`).">
<location
file="D:\Applications\Radio\app\build.gradle"/>
</issue>

我做错了什么?

最佳答案

将这个添加到项目gradle中

repositories {
mavenCentral()
}

在您的应用程序 gradle 代码下方

dependencies {
compile 'com.google.apis:google-api-services-androidpublisher:v3-rev95-1.25.0'
}

关于android - 发布到 Google Play 并添加到库以 gradle 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56847984/

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