I got this problem after I added firebase dependencies into gradle:
You just need to add this line above your error line :- //noinspection GradleCompatible
your error will be gone. If after doing this may be your error will not go just migrate your project in androidx and your error will be gone. Follow this step to migrate your project:- Refactor -> Migrate to AndroidX.
As per the Firebase Release notes :
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 .
You're using Support Library, namely, the old appcompat-v7:28.0.0
. You need to Migrate to AndroidX to use Firebase Database 18.0.0.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.