Why did this happen?
Because after upgrade, androidx.core:core
is accessed somewhere, when your project is still not using androidx. So classes like INotificationSideChannel
and many others are now found at two places - androidx.core:core
and com.android.support:support-compat
. That's why this error occured.
Solution?
You need to migrate to AndroidX which you should have done already. If you don't know about AndroidX. Please read What is AndroidX?
How to migrate current project
In Android Studio 3.2 (September 2018), there is direct option to migrate existing project to AndroidX
. This refract all packages automatically.
Before you migrate, it is strongly recommended to backup your project.
Existing project
- Android Studio > Refactor Menu > Migrate to AndroidX...
- It will analysis and will open Refractor window in bottom. Accept changes to be done.
New project
Put these flags in your gradle.properties
android.enableJetifier=true
android.useAndroidX=true
Check @Library mappings for equal AndroidX package.
Check @Official page of Migrate to AndroidX
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…