NotificationCompat.Builder的addAction不见了? [英] NotificationCompat.Builder addAction missing?

查看:693
本文介绍了NotificationCompat.Builder的addAction不见了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据href="http://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:

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

  1. 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不见了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆