另一个项目中已存在此包名称和 SHA-1 的 OAuth2 客户端 [英] An OAuth2 client already exists for this package name and SHA-1 in another project

查看:21
本文介绍了另一个项目中已存在此包名称和 SHA-1 的 OAuth2 客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在练习 firebase CodeLab (友好聊天) 用于使用 android 学习 firebase.在那个教程中,我在 firebase 控制台上做了一个名为Friendly Chat"的项目,然后我添加了我的 android 应用 package nameSHA-1 这样邀请和 Google Auth 就可以工作了.在完成该教程后,我从 github 获得了 firebase Auth demo project.我添加了 auth演示项目的包名SHA-1在同一个控制台项目Friendly Chat"中,它现在的意思是控制台项目Friendly Chat" 有两个 android 应用程序.然后我下载了 Auth 项目的 google.services.json 文件,当我在 Android Studio 中运行项目时,Auth 演示不起作用,因为它一直显示 loading progress Dialog.我想可能是因为我在同一个控制台项目中添加了两个 android 应用程序,所以,我从Friendly Chat 控制台项目并在 firebase 控制台上创建了另一个名为Project Auth"的项目,并添加了 Auth 演示 android 项目的包名称(我从 firebase github 存储库下载)但是当我尝试添加从友好聊天"控制台复制的 SHA-1 时项目,它给了我以下错误

I was practicing firebase CodeLab (Friendly Chat) for learning firebase with android. In that tutorials ,I made a project on firebase console named as "Friendly Chat" and then I add my android app package name and SHA-1 so that invites and Google Auth could be work. After that tutorial get compeleted, I got firebase Auth demo project from github.I add auth demo project's package name and SHA-1 in same console project "Friendly Chat",its mean now console project "Friendly Chat" have two android apps.Then I downlaoded google.services.json file of Auth project and when I run project in Android Studio,Auth demo did not work as it keep showing loading progress Dialog.I thought it may be because I added two android apps in same console project so,I delete auth app from Friendly Chat console project and made another project on firebase console named as "Project Auth" and I add package name of Auth demo android project (which I downloaded from firebase github repository) but when I tried to add SHA-1 copied from "Friendly Chat" console project,it gives me below error

另一个项目中已存在此包名称和 SHA-1 的 OAuth2 客户端"

"An OAuth2 client already exists for this package name and SHA-1 in another project"

为什么即使我从其他控制台项目中删除了 Auth 应用程序包名称和 SHA-1,我也会收到此错误.

why Im getting this error even I have deleted Auth app package name and SHA-1 from other console project.

推荐答案

所以答案写在错误中很好.不能有两个包名称相同的项目.就算删了.从开发者控制台完全删除需要至少 4-5 天的时间.

So the answer is well written in the error. You can't have two projects of same package name. Even if you delete it. It will take alteast 4-5 days to get deleted fully from developer's console.

因此,只有解决方案是通过从 android studio 生成签名的 apk 来自定义签名应用程序来生成新的 SHA-1 密钥.或者只是创建一个具有不同包名称的新项目 现在两种方式都可以使用.

So only solution is to generate a new SHA-1 key by custom signing the app by generating a signed apk from android studio. Or just create a new project with different package name both ways will work for now.

希望这些信息有帮助.如果它对您有任何改变,请告诉我.

Hope this info helps. Do let me know if it changes anything for you.

我鼓励您阅读这些有关签署 apk 的官方 Google 文档 以了解此过程.

I encourage you to go through these official Google docs on signing apk to understand this process.

这篇关于另一个项目中已存在此包名称和 SHA-1 的 OAuth2 客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆