【发布时间】:2019-02-05 01:01:27
【问题描述】:
添加firebase时
依赖关系
implementation 'com.google.firebase:firebase-core:16.0.6'
或者
implementation 'com.google.firebase:firebase-ads:17.1.2'
或者
implementation 'com.google.android.gms:play-services-ads:17.1.1
在实现“com.android.support:appcompat-v7:28.0.0”下显示错误,所有 com.android.support 库必须使用完全相同的版本规范(混合版本可能导致运行时崩溃)。
当我同步应用程序时没有错误,但安装应用程序时它显示您的应用程序已停止(在运行时崩溃)。
删除 firebase 依赖项并运行后,我的应用运行正常。
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
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.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-ads:17.1.2'
implementation 'com.google.android.gms:play-services-ads:17.1.1'
}
apply plugin: 'com.google.gms.google-services'
【问题讨论】:
-
通过文件资源管理器手动检查项目中的库并检测更新使用旧版本 28 的库。(自定义选项卡似乎是其中之一)
-
运行时出现什么错误,请放在这里。