android - 无法连接到 Firebase 和应用程序崩溃
问题描述
我正在尝试连接到 Android Studio 3.2.1 中的 firebase。应用 后implementation 'com.google.firebase:firebase-database:16.0.1:15.0.0'
,firebase 依赖项设置正确,当我删除 15.0.0 时,firebase 依赖项断开连接。此外,当连接到手机(Android 版本 7.1.1,系统版本 26.31.1)时,应用程序崩溃了。
我该如何进行?
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.android.support:support-media-compat:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-database:16.0.3'
implementation 'com.google.android.gms:play-services-ads:17.0.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.firebase:firebase-database:16.0.2'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1:15.0.0'
解决方案
推荐阅读
- terraform - 给定的值不适用于子模块
- python - 为什么我的小费计算器代码会打印两次 %?
- java - 为什么可以通过在 JAVA 中使用 new-operator 来制作泛型实例而泛型数组不可行
- node.js - Google Firestore 删除多个字段
- reactjs - 更改背景颜色时防止白页闪烁
- sql - 如何根据列频率显示所有行PostgreSQL
- node.js - 没有前端的Nodejs条带api
- firebase - 如何将我的数据从 Firestore 转换为身份验证用户
- flutter - Coc.nvim 似乎没有连接到我的 lsp
- sql - ORDER 结果基于自定义订单