Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle build fails with Google Service Plugin 3.2.0

I am attempting to update Google Services Plugin but receive an error during Gradle sync: "Project Refresh Failed: Error: No Match Found"

Everything works fine with Version 3.1.1 but as soon as I update the build.gradle to:

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

the error occurs.

I checked the idea.log as the error suggested and can see that an exception is being thrown but I really do not know why. It seems to get thrown at a method named "getJsonLocations" which seems to be new in 3.2.0 as shown in the image below.

enter image description here

Would anybody know how to resolve this?

like image 564
Kuffs Avatar asked Jan 30 '18 13:01

Kuffs


1 Answers

It seems that productFlavours must now start with a lower case letter for this plugin to work. Using a capital letter throws the exception shown in the question.

I do not see this limitation documented.

productFlavors {

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

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

Reported : https://issuetracker.google.com/issues/72581499

like image 100
Kuffs Avatar answered Oct 31 '22 14:10

Kuffs