gpt4 book ai didi

android - 由以下原因引起:org.gradle.api.tasks.TaskExecutionException:任务 ':app:processDebugGoogleServices'的执行失败

转载 作者:行者123 更新时间:2023-12-03 05:38:32 33 4
gpt4 key购买 nike

org.gradle.execution.MultipleBuildFailures: Build completed with 1 failures.

Caused by: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugGoogleServices'.

Caused by: org.gradle.api.GradleException: No matching client found for package name 'rt'at com.google.gms.googleservices.GoogleServicesTask.action(GoogleServicesTask.java:117)


为什么会出现此错误?
enter image description here
enter image description here
enter image description here

最佳答案

看来您缺少google-services.json文件,或者它有问题。

如果存在json文件(app / app / google-services.json),请确保包含您的软件包ID。如果不是,那可能是您的问题。

文件应如下所示:

"project_info": {
"project_number": "123456789",
"firebase_url": "https://xmpl.firebaseio.com",
"project_id": "xmpl",
"storage_bucket": "xmpl.appspot.com"
},

"client": [
{
"client_info": {
"mobilesdk_app_id": "1:684654651:android:1681354132165",
"android_client_info": {
"package_name": "com.example.app"
}
},
"oauth_client": [
{
"client_id": "65168135-sfas651fsad65f1sd.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.example.app",
"certificate_hash": "a16515asd1f65sd1f651sdf65"
}
},

删除文件,确保正确设置了应用程序级别gradle文件。

它必须包含以下内容:
apply plugin: 'com.google.gms.google-services'

清理,然后重建。

关于android - 由以下原因引起:org.gradle.api.tasks.TaskExecutionException:任务 ':app:processDebugGoogleServices'的执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54535352/

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