Gradle 构建失败 Google 服务插件 3.2.0
Gradle build fails with Google Service Plugin 3.2.0
我正在尝试更新 Google 服务插件,但在 Gradle 同步期间收到错误消息:
"Project Refresh Failed: Error: No Match Found"
版本 3.1.1 一切正常,但一旦我将 build.gradle 更新为:
classpath 'com.google.gms:google-services:3.2.0'
发生错误。
我按照错误提示检查了idea.log,可以看到正在抛出异常,但我真的不知道为什么。它似乎被一个名为“getJsonLocations
”的方法抛出,该方法似乎是 3.2.0 中的新方法,如下图所示。
有人知道如何解决这个问题吗?
看来 productFlavours
现在必须以小写字母开头才能使此插件正常工作。使用大写字母会引发问题中显示的异常。
我没有看到此限制的记录。
productFlavors {
// Works fine
notDemo {
applicationIdSuffix ".notDemo"
versionNameSuffix "-notDemo"
}
// Not valid because it starts with a capital letter
Demo {
applicationIdSuffix ".demo"
versionNameSuffix "-demo"
}
}
我正在尝试更新 Google 服务插件,但在 Gradle 同步期间收到错误消息: "Project Refresh Failed: Error: No Match Found"
版本 3.1.1 一切正常,但一旦我将 build.gradle 更新为:
classpath 'com.google.gms:google-services:3.2.0'
发生错误。
我按照错误提示检查了idea.log,可以看到正在抛出异常,但我真的不知道为什么。它似乎被一个名为“getJsonLocations
”的方法抛出,该方法似乎是 3.2.0 中的新方法,如下图所示。
有人知道如何解决这个问题吗?
看来 productFlavours
现在必须以小写字母开头才能使此插件正常工作。使用大写字母会引发问题中显示的异常。
我没有看到此限制的记录。
productFlavors {
// Works fine
notDemo {
applicationIdSuffix ".notDemo"
versionNameSuffix "-notDemo"
}
// Not valid because it starts with a capital letter
Demo {
applicationIdSuffix ".demo"
versionNameSuffix "-demo"
}
}