此软件包名称和SHA-1在另一个项目中已经存在一个OAuth2客户端 [英] An OAuth2 client already exists for this package name and SHA-1 in another project
问题描述
我正在练习firebase
CodeLab (友好聊天)与android
一起学习firebase
的方法.在该教程中,我在Firebase控制台上创建了一个名为"Friendly Chat
"的项目,然后添加了我的Android应用程序package name
和SHA-1
,以便邀请和Google Auth都可以使用.完成该教程后,我从github获得了Firebase Auth演示项目.我添加了auth演示项目的package name
和SHA-1
在同一控制台项目"Friendly Chat
"中,这意味着现在控制台项目"Friendly Chat
"具有两个android
应用程序.然后我下载了Auth项目的google.services.json
文件,并在运行时Android Studio
中的项目,身份验证演示无法正常工作,因为它一直显示loading progress Dialog
.我认为这可能是因为我在同一控制台项目中添加了两个android
应用程序,因此,我从Friendly Chat
控制台项目中删除了auth应用程序,并进行了在Firebase控制台上另一个名为"Project Auth
"的项目,我添加了Auth demo android项目的软件包名称(我是从firebase github存储库下载的),但是当我尝试添加从"Friendly Chat"控制台项目复制的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.
因此,只有解决方案是通过自定义签名对应用程序进行签名来生成新的SHA-1密钥,方法是通过android studio生成已签名的apk. 或者只是使用不同的程序包名称创建一个新项目,这两种方法现在都可以使用.
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屋!