Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to completely disconnect an Android app from Firebase (in Android studio)

I want to completely disconnect my app from Firebase. This question has been asked several times (e.g here). Most of the answers focus on disconnecting an app from Firebase within the Firebase console and not within Android studio.

After disconnecting my app from the Firebase console. Everytime I try to reconnect the app to another Firebase project, an error balloon pops up stating that the app is already part of a Firebase project. I know this behaviour occurs because some files from the old Firebase project are still present. How do I get rid of them?

like image 396
Taslim Oseni Avatar asked Dec 03 '22 11:12

Taslim Oseni


2 Answers

Try these steps to remove Fire-base from Android Studio project.

Delete google-services.json file from the Project (Find the file by Project view)

Remove dependencies from Project-level build.gradle (/build.gradle)

buildscript {
  dependencies {
    // Remove this line
    classpath 'com.google.gms:google-services:4.2.0'
  }
}

Remove all the Fire-base related dependencies from the project App-level build.gradle (//build.gradle) file

dependencies {
   // Remove this line
   implementation 'com.google.firebase:firebase-core:17.0.0'
}

Remove the line below from the bottom of the App-level build.gradle (//build.gradle) file

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

Restart Android Studio

like image 198
Md. Rejaul Karim Avatar answered Jan 18 '23 21:01

Md. Rejaul Karim


Try this, On the project level, delete the google-services.json file enter image description here

and then sync the project
enter image description here

like image 20
Agung Pramono Avatar answered Jan 18 '23 22:01

Agung Pramono