gpt4 book ai didi

android - 警告 "Must be one of"- NotificationManager.IMPORTANCE

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:48:34 25 4
gpt4 key购买 nike

在 Android Studio 中,我在 new NotificationChannel() 上遇到错误:

Must be one of: android.app.NotificationManager.IMPORTANCE_HIGH, android app.NotificationManager.IMPORTANCE_LOW, ...

但我确实引用了这个。
所以这似乎是 Android Studio 中的一个错误。
有没有人遇到同样的问题?

示例: enter image description here

而且我知道我可以添加一个 @Suppress 注释,但我想澄清它是否是一个错误。

编译SDK版本: 26
目标SDK版本:26
Android Studio 版本:3.0.1

我的导入:
enter image description here

最佳答案

有一个 bug reported in Android issue tracker关于这个。

还没有详细研究这个问题(现在这台电脑上没有 Android 工具),但它可能与 @Importance IntDef is annotated with @hide 的事实有关。因此不包含在 SDK 中。

关于android - 警告 "Must be one of"- NotificationManager.IMPORTANCE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48131068/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com