notifications - Android NoClassDefFoundError NotificationCompat.Builder -
java.lang.noclassdeffounderror: android/support/v4/app/notificationcompat$builder
i know error resolved adding private libraries project, in case if add together private libraries getting different error:
unable execute dex: multiple dex files define
and prepare above removing private libraries found here
so improve solution???
my code:
private void check() { notificationcompat.builder builder = new notificationcompat.builder( getapplicationcontext()); notification notification = builder.setsmallicon(r.drawable.icon) .setcontenttitle("new notification") .setcontenttext("hello world!").build(); notificationmanager notificationmanager = (notificationmanager) getsystemservice(context.notification_service); notificationmanager.notify(1, notification); }
my project build path :
i think have added 2 similar libraries project . go project properties ->java build path->libraries
android notifications
No comments:
Post a Comment