Reputation: 15
In gradle, at the end, I'm trying to insert this line apply plugin: 'com.google.gms.google-services' but whenever I sync the file I get this error:
Error:FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:processDebugGoogleServices'.
File google-services.json is missing. The Google Services Plugin cannot function without it. Searched Location: C:\Users\USER\AndroidStudioProjects\MyListViewApp\app\src\nullnull\debug\google-services.json C:\Users\USER\AndroidStudioProjects\MyListViewApp\app\src\debug\nullnull\google-services.json C:\Users\USER\AndroidStudioProjects\MyListViewApp\app\src\nullnull\google-services.json C:\Users\USER\AndroidStudioProjects\MyListViewApp\app\src\debug\google-services.json C:\Users\USER\AndroidStudioProjects\MyListViewApp\app\src\nullnullDebug\google-services.json C:\Users\USER\AndroidStudioProjects\MyListViewApp\app\google-services.json
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1s
Can anyone help?
Upvotes: 1
Views: 2673
Reputation: 58934
As error says File google-services.json is missing
, you have not included google-service json file in your project. Which is configuration file needed if you use any google api.
To include google-service.json in your project
Please go to this URL :
https://developers.google.com/mobile/add
Choose your Options and finally you will be able to download
google-service.json
file
copy that file and paste it Into
YourProjectName/app
Directory and build project.
Upvotes: 1