I am following this link to integrate Google sign-in in my android app.https://developers.google.com/identity/sign-in/android/start-integrating As given in last step on the
I'v got a same issue. but Now I'm fixed.
You should delete a line apply plugin: 'com.google.gms.google-services'
because "com.android.application" package already has same package.
This error comes up when there is change in your config.xml file resulting in mismatching of the data present in google-services.json file. I got it fixed this just by updating changes to my google-services.json file and building the app again ...it worked well.
Had the same problem with malformed error Deleted the line apply plugin: 'com.google.gms.google-services' And the build got successful
I've solved this problem by deleting the google-services.json file and downloading it again from Firebase console.
When you create an android application in firebase console you should set your application package in future it will be recorded to google-services.json
.
So this error can happen when you try to add google services in the application which has a different package (Current application package will not match to which was recorded to google-services.json
).
had the same issue as described by @scottyab.
all references were 8.4.0 but it failed due to a reference to app-measurement 8.3.0 that i did not reference anywhere (but one of the dependencies?). you can see the problem if you hover over the bad(red) dependency in Android Studio. explicitly adding
compile 'com.google.android.gms:play-services-measurement:8.4.0'
to app.gradle
solved the issue.