android - Firebase 项目已删除,但在 Android Studio 中仍显示已连接
问题描述
我在 android studio 3.1.3 中有一个项目,我已与 Firebase 连接以进行云消息传递。由于一些问题,我从 firebase 帐户中删除了该项目,并在 Android studio 中反转了完整的过程,例如删除 google json 文件,从中删除与 firebase 相关的依赖项gradle 文件。现在,当我尝试使用 Android Studio 中的助手使用另一个帐户将项目重新连接到 Firebase 时,它显示项目已连接并仅提示同步。我如何将我的项目与新帐户连接起来。
我的应用程序模块 gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android' .
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
ext {
support_version = '26.1.0'
} .
android {
compileSdkVersion 26
buildToolsVersion '27.0.3' .
defaultConfig {
applicationId “in.co.test”
minSdkVersion 23
targetSdkVersion 26
versionCode 4
versionName "2.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes
{
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
dataBinding {
enabled = true
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "com.android.support:support-v4:$support_version"
implementation "com.android.support:appcompat-v7:$support_version"
implementation "com.android.support.constraint:constraint-layout:1.0.2"
implementation "com.android.support:design:$support_version"
implementation "com.android.support:support-v4:$support_version"
implementation "com.andkulikov:transitionseverywhere:1.7.7"
implementation 'com.github.bumptech.glide:okhttp-integration:4.3.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.3.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
kapt 'com.github.bumptech.glide:compiler:4.3.1'
}
repositories {
mavenCentral()
}
解决方案
感谢@grant 的回复。最后我通过以下步骤解决了:-
1)删除了 google-services.json
2)删除了依赖项:
来自 gradle -project
dependencies{
classpath 'com.google.gms:google-services:3.1.1'classpath 'com.google.gms:google-services:3.1.1'
}
从 gradle 模块
dependencies{
implementation 'com.google.firebase:firebase-messaging:11.8.0'
}
删除清单文件中的任何服务类条目,创建扩展 FirebaseInstanceIdService。
推荐阅读
- python - Stripe -> 通过代码配置客户门户时的问题
- python - 如何获得完成 Celery 任务所需的估计时间?
- c# - 你可以使用 lambda 表达式和 .find 吗?
- javascript - Discord.js - awaitReactions 在捕获超时错误时给出错误
- vue.js - 问题“当我扩展时,[vuex] 不会在突变处理程序问题之外改变 vuex 存储状态”组件
- dataweave - 如何按属性名称排序?
- azure-sql-database - Azure SQL 未返回结果
- docker - 如何使用多阶段 docker 镜像将 libnss3.so 从一个镜像复制到另一个镜像
- django - 在 django 中显示特定项目下的任务
- python - 为什么我的 for 循环不检查文件的最后一行是否有重复项?Python