Above asked question has been solved as according to documentation at developer.google.com https://developers.google.com/cloud-messaging/android/client#get-config
The file google-services.json
should be pasted in the app/ directory.
After this is when I sync the project with gradle file the unexpected Top level exception error comes. This is occurring because:
Project-Level Gradle File having
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
classpath 'com.google.gms:google-services:1.3.0-beta1'
}
and App-Level Gradle File having:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.google.android.gms:play-services:7.5.0' // commenting this lineworks for me
}
The top line is creating a conflict between this and classpath 'com.google.gms:google-services:1.3.0-beta1'
So I make comment it now it works Fine and no error of
File google-services.json is missing from module root folder. The Google Quickstart Plugin cannot function without it.