Call requires API level 16 (current min is 14): android.app.Notification.Builder#build -


enter image description herethe documentation says notification.builder added in api level 11. why lint error?

call requires api level 16 (current min 14): android.app.notification.builder#build

notification = new notification.builder(ctx)                 .setcontenttitle("title").setcontenttext("text")                 .setsmallicon(r.drawable.ic_launcher).build(); 

manifest:

<uses-sdk     android:minsdkversion="14"     android:targetsdkversion="17" /> 

am missing something?

correct me if wrong api added in level 11, right? added in api level 11

notificationbuilder.build() requires api level 16 or higher. between api level 11 & 15 should use notificationbuilder.getnotification(). use

notification = new notification.builder(ctx)                 .setcontenttitle("title").setcontenttext("text")                 .setsmallicon(r.drawable.ic_launcher).getnotification(); 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -