问题
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.
Would anybody know how to resolve this?
回答1:
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
来源:https://stackoverflow.com/questions/48522688/gradle-build-fails-with-google-service-plugin-3-2-0