android - 尝试实施 Google Speech to Text 后,名称为 [DEFAULT] 的 FirebaseApp 不存在
问题描述
我有一个使用 Firestore 的应用程序。然后我尝试将 Google Speech to Text 添加到应用程序中,突然 Firestore 连接停止工作。在这里,我将在 app/build.gradle 脚本之前和之后发布,希望任何人都可以看到这个问题。我不会发布脚本中没有更改的部分。
前:
dependencies {
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'androidx.browser:browser:1.2.0'
implementation 'com.squareup.okhttp3:okhttp:4.8.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'dev.dworks.libs:astickyheader:0.1.0'
implementation 'se.emilsjolander:stickylistheaders:2.7.0'
implementation 'com.github.wangjiegulu:AndroidBucket:1.0.4'
implementation 'com.android.support:preference-v7:29.0.0'
implementation "androidx.appcompat:appcompat:1.1.0"
implementation 'com.google.firebase:firebase-analytics:17.5.0'
implementation 'com.android.support:support-v4:29.0.0'
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'com.google.firebase:firebase-firestore:21.6.0'
}
后
dependencies {
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'androidx.browser:browser:1.2.0'
implementation 'com.squareup.okhttp3:okhttp:4.8.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'dev.dworks.libs:astickyheader:0.1.0'
implementation 'se.emilsjolander:stickylistheaders:2.7.0'
implementation 'com.github.wangjiegulu:AndroidBucket:1.0.4'
implementation 'com.android.support:preference-v7:29.0.0'
implementation "androidx.appcompat:appcompat:1.2.0"
//implementation 'com.google.firebase:firebase-analytics:17.5.0'
implementation 'com.android.support:support-v4:29.0.0'
implementation 'com.android.support:support-annotations:28.0.0'
implementation fileTree(include: '*.jar', dir: 'libs')
implementation ('com.google.firebase:firebase-firestore:21.6.0') {
exclude(group: 'com.google.firebase', module: 'firebase-database-collection')
exclude(group: 'com.google.firebase', module: 'firebase-auth-interop')
exclude(group: 'com.google.firebase', module: 'firebase-common')
}
implementation 'com.google.api.grpc:grpc-google-cloud-speech-v1:1.23.0'
implementation 'com.google.firebase:firebase-admin:6.2.0'
}
configurations.implementation.exclude(group: 'com.google.firebase', module: 'protolite-well-known-types')
configurations.implementation.exclude(group: 'com.google.guava', module: 'guava-jdk5')
configurations.implementation.exclude(group: 'com.google.protobuf', module: 'protobuf-javalite')
configurations.implementation.exclude(group: 'com.google.firebase', module: 'firebase-auth-interop')
configurations.implementation.exclude(group: 'com.google.firebase', module: 'firebase-common')*/
configurations.implementation.exclude(group: 'com.google.android.gms', module: 'play-services-basement')
更改会产生以下错误:java.lang.IllegalStateException: FirebaseApp with name [DEFAULT] 不存在。
是什么导致我出现这些问题?
解决方案
推荐阅读
- r - data.table (r) 中的加权滚动中位数
- python - 仅在日期更改时运行脚本时如何增加变量?
- java - GMapsFX 未在 Java 11 上显示
- r - 基于 swithcInput 的具有滑块输入的 ConditionalPanel
- python - 龙卷风不能正确产生期货
- angular - 如何在 Linux 上使用 tomcat 或 nginx 使用 kerberos 单点登录对 Angular 7 SPA 进行身份验证
- java - 使用 Java 和 mongodb.DBObject 解析 json 文件时出现问题
- python - 当 python 看门狗观察器运行时 GUI 不出现
- angular - 在 ngFor 内部时,Angular 双向数据绑定不起作用(模型不更新)
- database - 如何使用列的宽度假脱机列值