使用Google Service Plugin 3.2.0进行Gradle构建失败

Kuf*_*ffs 9 android google-play-services android-studio android-gradle-plugin

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

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

classpath 'com.google.gms:google-services:3.2.0'
Run Code Online (Sandbox Code Playgroud)

发生错误.

我检查了idea.log作为错误建议,可以看到异常被抛出,但我真的不知道为什么.它似乎被抛出一个名为" getJsonLocations" 的方法,这似乎是3.2.0中的新方法,如下图所示.

在此输入图像描述

有人知道如何解决这个问题吗?

Kuf*_*ffs 37

现在看来productFlavours必须以小写字母开头才能使这个插件工作.使用大写字母会抛出问题中显示的异常.

我没有看到记录这个限制.

productFlavors {

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

    // Not valid because it starts with a capital letter
    Demo {
        applicationIdSuffix ".demo"
        versionNameSuffix "-demo"
    }
}
Run Code Online (Sandbox Code Playgroud)

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