简体   繁体   中英

Google-services.json not found

I am facing this error

Error:Execution failed for task ':app:processDebugGoogleServices'.

File google-services.json is missing. The Google Services Plugin cannot function without it. Searched Location: C:\\Users\\Kartik\\AndroidStudioProjects\\barcode\\app\\src\\debug\\google- services.json C:\\Users\\Kartik\\AndroidStudioProjects\\barcode\\app\\google-services.json

I have added this path in build.gradle(project:barcode)

classpath 'com.android.tools.build:gradle:2.1.2'

classpath 'com.google.gms:google-services:3.0.0'

and added this in build.gradle(Module:app)

apply plugin: 'com.google.gms.google-services' 

I have also added the google-services.json file in project->app folder but then also it is giving the same error.

i faced the same problem before . check the json file name and make sure that there is no additional spaces

First of all please make sure that you have followed documentation for firebase and not google developers guidelines and alspo generated Google-services.json for firebase project that is running in your firebase-console, you can see all your running projects in your dashboard in firebase

Make sure you have correct json file, this problem is describe here .

You can follow these steps also as per firebase documentaion .

still if you are all correct and getting errors make sure you have updated play services version in your SDK and also put this line in your app module build.gradle file, to make sure that multidex is unable. Hope you will make something out of it.

defaultConfig {
    multiDexEnabled true
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM