I followed google documentation to integrate my app to Google Analytics. But when adding
apply plugin: \'com.google.gms.google-services\'
and b
Need to enter the following entry in both gradle:
Add the following to the @project level gradle file:
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.google.gms:google-services:3.0.0'
Add the following to the @app level gradle file:
// Dependency for Google Sign-In
compile 'com.google.android.gms:play-services-auth:9.4.0'
Add plugin:
apply plugin: 'com.google.gms.google-services'
Add the following to the @project level gradle file:
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.google.gms:google-services:3.0.0'
I was having this exact issue, and the following fixed it.. go to platforms>android>project.properties and edit the lines
cordova.system.library.5=com.google.android.gms:play-services-auth:+
cordova.system.library.6=com.google.android.gms:play-services-identity:+
to
cordova.system.library.5=com.google.android.gms:play-services-auth:11.0.1
cordova.system.library.6=com.google.android.gms:play-services-identity:11.0.1
It is said that # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
But this fixed my issue
Sometimes, you have to update your REALM-PLUGIN and you need to write this in Top-Level Gradle (Project:Gradle), copy paste below "classpath" line:
buildscript {
...
dependencies {
classpath 'io.realm:realm-gradle-plugin:7.0.0' //<--Your answer.
}
}
Replace the line
compile 'com.google.android.gms:play-services-gcm:+'
with the following
compile 'com.google.android.gms:play-services-gcm:8.4.0'
in the application build.gradle file.
At first you should call
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.google.gms:google-services:2.0.0-alpha2'
}
Don't (Avoid calling +
)
compile 'com.google.android.gms:play-services-gcm:+'
compile 'com.google.android.gms:play-services:8.4.0'
Do
compile 'com.google.android.gms:play-services:8.4.0'