Android studio 重命名包后抛出 No matching client found [英] Android studio after renaming package it throws No matching client found

查看:25
本文介绍了Android studio 重命名包后抛出 No matching client found的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照以下链接重命名包.重命名后,当我尝试构建项目时,android studio 抛出类似错误.

I followed the below link for renaming the package. After renaming when i try to build the projects android studio throws error like.

Android Studio 重命名包

错误:任务:app:processDebugGoogleServices"的执行失败.找不到包名称com.example.app"的匹配客户端

Error:Execution failed for task ':app:processDebugGoogleServices'. No matching client found for package name 'com.example.app'

推荐答案

您已将 Google Play 服务插件添加到项目中,该插件从应用模块中的 google-services.json 中读取.

You have added the Google Play Services plugin to the project, which reads from the google-services.json found in your app module.

google-services.json 包含服务配置数据,例如 Google 项目 ID、应用程序包名称等.

The google-services.json contains service configuration data, such as Google Project ID, application package name, etc..

由于应用程序包名称也存储在该 json 中,它将不再匹配,因此您必须在 Firebase 控制台中创建一个新应用程序,并导出新的配置 json.

Since the application package name is also stored in that json, it will not match anymore, so you have to create a new application in your Firebase console, and export the new configuration json.

然后将项目中的 google-services.json 替换为您生成的那个.

Then replace the google-services.json in your project with the one you have generated.

这篇关于Android studio 重命名包后抛出 No matching client found的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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