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

僤鯓⒐⒋嵵緔 提交于 2021-01-27 13:30:34

问题


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?


回答1:


You should undo all the steps that you are instructed to perform in the manual integration. So, remove all Firebase dependencies from build.gradle, remove the Google Services plugin from the bottom of build.gradle, and remove the google-services.json file.




回答2:


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




回答3:


Try this, On the project level, delete the google-services.json file

and then sync the project




回答4:


Try shutting down the Firebase project created with the package name of the connected application; although it doesn't delete at the same time and is scheduled for later. Don't link your android app with any other firebase app till the previous connected app has been deleted completely.




回答5:


Do the following (If you want to Switch Firebase Data Sources): In Android Studio, Go to Tools>Firebase, Choose any of the options such as Real time-database Click Connect to Firebase. You will get a warning that the App is already connected to Firebase. Click okay. Android Studio will open a Firebase console on a browser. Choose the Firebase App you want to you want to connect to. Done.



来源:https://stackoverflow.com/questions/51549554/how-to-completely-disconnect-an-android-app-from-firebase-in-android-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!