The error is:
File google-services.json is missing from module root folder. The Google Quickstart Plugin cannot function without it.
This question is related to
android
google-play-services
This error indicates your package_name
in your google-services.json
might be wrong. I personally had this issue when I used
buildTypes {
...
debug {
applicationIdSuffix '.debug'
}
}
in my build.gradle
. So, when I wanted to debug, the name of the application was ("all of a sudden") app.something.debug
instead of app.something
. I was able to run the debug when I changed the said package_name
...
For using Google SignIn in Android app, you need
google-services.json
which you can generate using the instruction mentioned here
WINDOWS
(Alt+F12 or View->Tool Windows->Terminal).
Then type "move file_path/google-services.json app/"
without double quotes.
eg
move C:\Users\siva\Downloads\google-services.json app/
LINUX
scp file_path/google-services.json app/
eg:
scp '/home/developer/Desktop/google-services.json' 'app/'
google-services.json file work like API keys means it store your project_id and api key with json format for all google services(Which enable by you at google console) so no need manage all at different places.
at application gradle you should add
apply plugin: 'com.google.gms.google-services'.
at top level gradle you should add below dependency
dependencies {
// Add this line
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
The document says:
Copy the file into the
app/
folder of your Android Studio project, or into theapp/src/{build_type}
folder if you are using multiple build types.
Click right above the app i.e android(drop down list) in android studio.Select the Project from drop down and paste the json file by right click over the app package and then sync it....
Instead of putting in root folder as given in docs of firebase, just copy the google-json file in the projectname/app 's root folder and it works fine then . Its just simple !
Source: Stackoverflow.com