【报错】"The constructor Notification(int, CharSequence, long) is deprecated

Notification的构造方法 Notification(int, CharSequence, long) 在API11之后就淘汰了,之后的API需要用Notification.Builder()方法:

Notification notification = new Notification.Builder(context)
    .setContentText(CharSequence)
    .setSmallIcon(int)
    .setWhen(long)
    .build();


posted @ 2016-07-14 15:08  亲爱的村姑  阅读(1313)  评论(0编辑  收藏  举报