gpt4 book ai didi

android - 错误 : Execution failed for task ': app: processDebugGoogleServices

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:35:43 28 4
gpt4 key购买 nike

我在 Android Studio 中有一个错误。新建activity空白应用,我添加“build.gradle(project)”

 dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-alpha9'
classpath 'com.google.gms: google-services: 2.0.0-alpha9'
}

在“build.gradle (app)”中

dependencies {
compile FileTree (dir: 'libs', include: ['* .jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'

// Dependency for Google Sign-In
compile 'com.google.android.gms: play-auth-services: 8.4.0'
}

apply plugin: 'com.google.gms.google-services'

编译,错误为:

"Error: Execution failed for task ': app: processDebugGoogleServices'. Com.google.gson.stream.MalformedJsonException: Expected name at line 28, column 20 "

我重新安装了 Android Studio、SDK,还是一样,有什么想法吗?

最佳答案

您似乎正在您的应用中进行 Google 登录。
apply plugin: 'com.google.gms.google-services' 语句会尝试解析您的 google-services.json 文件(通常位于 app 文件夹中)< br/>打开该文件并在第 28 行查找任何格式错误的 JSON。
(可能将其复制/粘贴到 online JSON validator 中)。

关于android - 错误 : Execution failed for task ': app: processDebugGoogleServices,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35184524/

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