Android studio Firebase 依赖项与 appcompat 不兼容
Android studio Firebase dependency is not compatible with appcompat
我正在尝试使用 appcompat-v7:27.0.0
将 firebase-auth:15.0.0
依赖项添加到我的项目中,但它会导致警告 "mixing versions can lead to runtime crashes"。
我还尝试添加 firebase-auth:15.1.0
的新更新依赖项,但它会导致同样的问题。
这是我的依赖块
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.google.firebase:firebase-auth:15.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'
}
只要您在较低版本上使用 运行 的库,就无法升级到版本 27.1.0。在您的情况下,您只需 "give in" 并选择版本 26.1.0(最低公分母)。一旦所有库都升级到 27.1.0,您就可以升级到版本 27.1.0。
请尝试
implementation 'com.android.support:appcompat-v7:26.1.0'
试试这个
implementation('com.google.android.gms:play-services-ads:15.0.1') {
exclude group: "com.android.support"
}
此视频中的错误已在此处修复https://youtu.be/Vjy_uv10t30
或
添加这个 //noinspection GradleCompatible
之前
implementation 'com.android.support:appcompat-v7:28.0.0'
同步
就这些了。
我正在尝试使用 appcompat-v7:27.0.0
将 firebase-auth:15.0.0
依赖项添加到我的项目中,但它会导致警告 "mixing versions can lead to runtime crashes"。
我还尝试添加 firebase-auth:15.1.0
的新更新依赖项,但它会导致同样的问题。
这是我的依赖块
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.google.firebase:firebase-auth:15.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'
}
只要您在较低版本上使用 运行 的库,就无法升级到版本 27.1.0。在您的情况下,您只需 "give in" 并选择版本 26.1.0(最低公分母)。一旦所有库都升级到 27.1.0,您就可以升级到版本 27.1.0。
请尝试
implementation 'com.android.support:appcompat-v7:26.1.0'
试试这个
implementation('com.google.android.gms:play-services-ads:15.0.1') {
exclude group: "com.android.support"
}
此视频中的错误已在此处修复https://youtu.be/Vjy_uv10t30
或
添加这个 //noinspection GradleCompatible
之前
implementation 'com.android.support:appcompat-v7:28.0.0'
同步
就这些了。