据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不见了?
发布评论