NotificationCompat.Builder缺少的build()方法 [英] NotificationCompat.Builder missing build() method
问题描述
我想这样做完全是,他所做的: Android的通知的时间 但在我AlarmReceiver课,我有一个错误:该方法生成()是未定义的类型NotificationCompat.Builder,在行:mNotificationManager.notify(1,mBuilder.build());
I want to do exactly, what he does: Android Notification at time But in my AlarmReceiver class, I have an error: The method build() is undefined for the type NotificationCompat.Builder, at line: mNotificationManager.notify(1, mBuilder.build());
在Android开发者网站是一个类似code,但同样的错误出现(的 http://developer.android.com/training/notify-user/build-notification.html )。
In android developer site is a similar code, but the same error appears(http://developer.android.com/training/notify-user/build-notification.html).
任何帮助是极大的AP preciated。
Any help is greatly appreciated.
推荐答案
您可能对Android的支持包的旧版本。确保您的项目有 Android的支持 - v4.jar
或 Android的支持 - v13.jar
在库/
。
You may be on an older version of the Android Support package. Make sure that your project has a current copy of android-support-v4.jar
or android-support-v13.jar
in libs/
.
这篇关于NotificationCompat.Builder缺少的build()方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!