Search code examples
androidandroid-intentnotificationsalarmmanager

NotificationCompat.Builder missing build() method


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());

In android developer site is a similar code, but the same error appears(http://developer.android.com/training/notify-user/build-notification.html).

Any help is greatly appreciated.


Solution

  • 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/.