Deleting google-services json file

17,521

Solution 1

First you have to just download the new fresh google-services.json.

then copy the file.

paste it into Project view -> app folder in your android-studio app.

It will overwrite your existing file

Suppose you are not able to do it, just do this.

That json file referenced in android-studio cache so once close your android studio and then delete this file it will delete.. Hope it will help you...

Solution 2

Step 1. Close your Android Studio.

Step 2. Go to the location of the project.

Step 3. Delete the google-services.json

It will get deleted without any problem.

Cheers!

Solution 3

Open Task Manager (Press Alt + Ctr + delete) and end the running JDK process and try again the android platform removal

Solution 4

The error is due to the fact your google-services.json file is open in any background process may be in openJDK binary which doesn't allow it to delete. You can solve this issue without deleting the json file rather replace the content of your old google-services.json file with the new one and rebuild the project.

Solution 5

Delete apply plugin: 'com.google.gms.google-services'trong text from build.gradle, sync and then delete google-services, then add again apply plugin: 'com.google.gms.google-services'

Share:
17,521
Divyang Shah
Author by

Divyang Shah

I am passionate about coding and all technologies in general . I believe from my experience I can optimise anything and everything over a period of time!!

Updated on June 11, 2022

Comments

  • Divyang Shah
    Divyang Shah about 2 years

    Actually by mistake I pasted google-services json file of another project in my current project of android .So when building the app , i get error no matching client found for package 'com.mybidu.www'. I tried to delete the file but it gives error 'Java IO Exception Cannot delete google-services.json ' Nor does it allow me to overwrite the same file . What should i do ?