为什么我不能导入“ androidx.core.app.NotificationChannelCompat”?

问题描述

我正在根据{Androidx API参考)[https://developer.android.google.cn/reference/androidx/core/app使用androidx.core.app.NotificationChannelandroidx.core.app.NotificationChannelCompat解决android兼容问题/ NotificationChannelCompat]。

但是,即使我在自己的build.gradle文件添加implementation "androidx.core:core:1.3.1,Android Studio也会提示我无法重新构建符号NotificationChannelCompat

为什么?我不想使用SDK版本的条件语句来填充我的源代码

解决方法

如果您进行更改,它将解决config.json

NotificationChannelCompat

 implementation "androidx.core:core:1.3.2"

最新版本:https://developer.android.com/jetpack/androidx/releases/core

这是提交,丢失了:-) https://android-review.googlesource.com/c/platform/frameworks/support/+/1360061