NotificationCompat.Builder的addAction不见了?

编程入门 行业动态 更新时间:2024-10-24 20:13:03
本文介绍了NotificationCompat.Builder的addAction不见了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

据href="goo.gl/Qr8IO">官方文档的NotificationCompat.Builder类应该有方法的addAction的

According to the official documentation the NotificationCompat.Builder class should have method addAction, however I am unable to find it (I am getting "The method addAction(int, String, null) is undefined for the type NotificationCompat.Builder")

有没有人想出如何访问该方法?

Has anyone figured out how to access this method?

推荐答案

缺失的方法已经被加入到Android的支持库R11。将它添加到你的项目,你必须:

The missing methods have been added to Android support library r11. To add it to your project you must:

  • 打开Android的SDK管理器。向下滚动并找到 其他/ Android的支持库包。检查版本列, 如果您有任何小于11,你需要先更新你的SDK。 在Eclipse中,它通过菜单帮助完成/检查更新。

  • Open the Android SDK Manager. Scroll down and find the Extras/Android Support Library Package. Check the revision column, if you have anything less then 11 you need to update your SDK first. In Eclipse that is done through the menu Help/Check for Updates.

    在安装Android支持库,你必须手动复制 到你的项目的libs文件夹中。该罐位于:

    After you install the Android Support Library you must manually copy it into your project's libs folder. The jar is located at:

    <your android sdk location>/extras/android/support/v13/android-support-v13.jar
  • 更多推荐

    NotificationCompat.Builder的addAction不见了?

    本文发布于:2023-11-16 18:51:24,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1606900.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:不见了   NotificationCompat   Builder   addAction

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!