【发布时间】:2020-12-23 06:40:10
【问题描述】:
我正在使用androidx.core.app.NotificationChannel和androidx.core.app.NotificationChannelCompat根据(Androidx API参考)[https://developer.android.google.cn/reference/androidx/core/app/NotificationChannelCompat]解决android兼容问题。
但即使我在 build.gradle 文件中添加implementation "androidx.core:core:1.3.1,Android Studio 也会提示我无法解析符号NotificationChannelCompat。
为什么?我不想使用 SDK 版本的条件语句来填充我的源代码。
【问题讨论】:
-
在“刷新 Gradle 项目”之后尝试“清理构建”。
-
@FelixFavourChinemerem 谢谢你的评论。但我找不到“清理构建”菜单项。我刚刚发现“无效缓存/重启......”,但它没有任何帮助。
-
你试过重启你的电脑吗?
-
@FelixFavourChinemerem 请您启动一个空项目来验证它吗?非常感谢。
标签: android android-notifications android-support-library androidx