问题
Hello I had a little question about adding dependency for firebase. when I add this line: implementation 'com.google.firebase: firebase-core: 17.0.0'
to my buil.gradle I see an error line at the line: implementation 'com.android.support:appcompat -v7: 28.0.0
. I searched but not yet a solution. Thank you for helping me.
回答1:
Firebase migrated to AndroidX in the latest release. So no more supports for the old support libraries. You have to either downgrade firebase,
implementation 'com.google.firebase:firebase-core:16.0.9'
or migrate your app to use AndroidX as mentioned below.
This release is a MAJOR version update and includes breaking changes. With this release, libraries are migrated from the Android Support Libraries to the Jetpack (AndroidX) Libraries. The updated libraries will not work unless you make the following changes in your app:
Upgrade com.android.tools.build:gradle to v3.2.1 or later.
Upgrade compileSdkVersion to 28 or later.
Update your app to use Jetpack (AndroidX); follow the instructions in Migrating to AndroidX.
来源:https://stackoverflow.com/questions/56794619/appcompat-error-with-firebase-library-implementation