android - 您指定的指纹已被此项目或其他项目中的 Android OAuth2 客户端 ID 使用

标签 android android-studio sha google-api-console

我注意到我在 android studio 中的 gradle View 签名报告中显示的 SHA1 编号与我原来的不同。我想也许是一年前换电脑的缘故。我的游戏应用程序仍然能够访问排行榜和成就。当我访问我的 Google API 仪表板时,我注意到“OAuth 客户端”有我的旧 SHA1。它不会让我将它更改为我的新 SHA1,说它“已经被这个客户或另一个客户使用过”,尽管我没有其他客户。神秘的“Anroid client 1”和“Android client 2”既没有旧的也没有新的 SHA1。在“OAuth 客户端”下面是“OAuth 客户端(由谷歌服务自动创建)”,它有我的新 SHA1。我继续删除了那个,尽管它警告我它在上周被使用了 147 次(我想这是我即将衰老的证据)。看来我必须删除它才能释放我的“OAuth 客户端”的号码,该号码不是自动创建的。

现在看来我被搞砸了,因为当我尝试更改 SHA1 时它仍然给我“已经在使用的消息”,而且我的游戏应用程序根本无法再访问 Google Play 服务。我在想我应该删除“OAuth 客户端”。我可以从中恢复吗?它会随着时间的推移而释放吗?另一篇帖子建议在 7 天内删除客户端,尽管我没有看到删除整个客户端的按钮,并且担心同一页面上的 API 代码被删除。

编辑 3/30 - 看起来我可能已经永久失去了这个数字,尽管(我希望)它只影响我的排行榜和成就,而不影响 Firebase、应用内购买或广告。无论如何,我可以在 Firebase 中推出自己的排行榜和成就。具有不同包名的新项目在 Gradle signingReport 中给出了相同的不可用 SHA1。

enter image description here

最佳答案

我终于通过电子邮件从 Google 支持人员那里得到了有用的回复,仅提供了有关如何开始恢复过程的线索:

I understand you're receiving a Client ID error when trying to link your app to a Game Services project. This error message is displayed because your package ID and SHA1 are already in use by another Client ID.

To resolve this issue, please use the steps below to delete the Client ID from your Google Developers Console (formerly Cloud Console).

Important: Do not delete the Google Developers Console project before deleting the Client ID. If you’ve already deleted the project, you will need to undelete it from your Projects list.

1. Use the following URL to access the project - https://console.developers.google.com/project/186639667931
2. Select APIs & auth > Credentials
3. Under “Client ID for Android application” click the “Delete” button.
4. Try linking your app in the Play Console again. If you’re unable to view or undelete the project linked in step 1, please try accessing it while logged in with the primary email address on your Play developer account.

没有“Android 应用程序的客户端 ID”,但在“OAuth 2.0 客户端 ID”下有一个“OAuth 客户端”,所以我删除了它。那仍然有一个旧的 SHA1 号码,因为它不会占用我当前的号码。所以我并没有真正删除我当前号码的东西,但是删除这个删除了整个客户端并出现了一个空白屏幕。这里有点陷阱。我将我当前的 SHA1 号码添加到该屏幕,它接受了。现在我可以从我的应用程序再次获得来自 Google Play 网站的响应,尽管它的响应始终是“无法访问服务”。

事实证明,此屏幕是默认屏幕,即“Google Play Android Developer”。我将不得不研究一下这是什么,但我需要添加 SHA1 的是我的实际应用程序名称。我最终发现隐藏在最顶部的下拉列表中,在“Google API”旁边,在我下载的示例应用程序和“Google Play Android Developer”中。在我返回并从“Google Play Android Developer”中删除“OAuth Client”之前,我仍然无法将当前的 SHA1 添加到其中。这买回了相同的默认屏幕,所以我回到下拉列表,选择我的应用程序名称,然后终于能够将我当前的 SHA1 添加回它。

因此,删除 SHA1 似乎并不是从 Play 服务中永久放逐,只是重新建立它的棘手过程的开始。

关于android - 您指定的指纹已被此项目或其他项目中的 Android OAuth2 客户端 ID 使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49565332/

相关文章:

c - OpenSSL SHA1 未验证 NIST SHAKE 测试 vector ?

android - 是否可以在不依赖 kotlin-stdlib 的情况下在 JVM 或 Android 上使用 kotlin?

android - java.lang.RuntimeException : Internal error in Firestore (0. 6.6-dev)

java - Android 资源链接在 Apk 构建上失败

android - 我在库中的 R 是红色的,但我可以正常构建和运行应用程序

java - 无法从 bouncycaSTLe 和 openssl dgst 获取匹配的 SHA1 摘要

Android 循环进度条大小

android - 在 Android View 上哪里可以正确释放位图?

android - 在 android 中集成 youtube channel

md5 - 是否可以从一种哈希值转换为另一种哈希值?