Lalit Kushwah Lalit Kushwah - 5 months ago 973
Android Question

Add google-services.json in android studio

File google-services.json is missing from module root folder. The Google Quickstart Plugin cannot function without it.

Answer

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 synch 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.