gpt4 book ai didi

android - 使用 Google Service Plugin 3.2.0 的 Gradle 构建失败

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:16:41 26 4
gpt4 key购买 nike

我正在尝试更新 Google 服务插件,但在 Gradle 同步期间收到错误消息:“项目刷新失败:错误:未找到匹配项”

版本 3.1.1 一切正常,但只要我将 build.gradle 更新为:

classpath 'com.google.gms:google-services:3.2.0'

发生错误。

我按照错误提示检查了idea.log,可以看到正在抛出异常,但我真的不知道为什么。它似乎被一个名为“getJsonLocations”的方法抛出,该方法似乎是 3.2.0 中的新方法,如下图所示。

enter image description here

有人知道怎么解决吗?

最佳答案

看来 productFlavours 现在必须以小写字母开头才能使此插件正常工作。使用大写字母会引发问题中显示的异常。

我没有看到此限制的记录。

productFlavors {

// Works fine
notDemo {
applicationIdSuffix ".notDemo"
versionNameSuffix "-notDemo"
}

// Not valid because it starts with a capital letter
Demo {
applicationIdSuffix ".demo"
versionNameSuffix "-demo"
}
}

报告:https://issuetracker.google.com/issues/72581499

关于android - 使用 Google Service Plugin 3.2.0 的 Gradle 构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48522688/

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