I am trying to use GcmListnerService and I added the required dependencies for google services in gradle files, as shown below. but when I sync I receive the following error:
Error:Execution failed for task ':appcompat:processReleaseGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
C:\Users\aba\AndroidStudioProjects\MEN\appcompat\src\release\google-services.json
C:\Users\aba\AndroidStudioProjects\MEN\appcompat\google-services.json
to solve this issue, I found similar posts recommend generating a 'configuration files', so i generated one and downloaded it. Now, would you please tell me what should I do with file? what to do with it.
build.gradle app:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':appcompat')
compile project(':securepreferences')
compile 'com.android.support:support-v4:25.2.0' // .0.1
compile 'com.google.android.gms:play-services:11.0.2'
// compile 'com.google.android.gms:play-services-maps:10.0.1'
// compile 'com.google.android.gms:play-services-location:10.0.1'
// AVK 05.02.2017 compile 'com.github.chrisbanes.photoview:library:1.2.2'
compile 'com.google.code.gson:gson:2.7' // 2.4
compile 'com.squareup.picasso:picasso:2.4.0'
version: '1.9.0'
compile files('app/libs/android-viewbadger.jar')
compile files('gradle/wrapper/gradle-wrapper.jar')
}
build.gradle project:
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}