HanTeIsHanTe
我不知道怎么命名了---
2016-08-08 10:51

RuntimeException: bad array lengths

10

Fatal Exception: java.lang.RuntimeException: bad array lengths
at android.os.Parcel.readIntArray(Parcel.java:926)
at android.app.INotificationManager$Stub$Proxy.enqueueNotificationWithTag(INotificationManager.java:777)
at android.app.NotificationManager.notify(NotificationManager.java:272)
at android.app.NotificationManager.notify(NotificationManager.java:211)
at cc.netpas.android_firewall.service.BackgroundDaemon$3.run(BackgroundDaemon.java:297)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.os.HandlerThread.run(HandlerThread.java:61)

        设置通知栏时会发生以上错误,有哪位大神指点指点

        这是代码:
         private Runnable updateConnectedTimer = new Runnable() {
    @Override
    public void run() {

        if (BackgroundDaemon.this.connectedTime == 0) {
            BackgroundDaemon.this.connectedTime = System.currentTimeMillis();
        }
        long resultTime = System.currentTimeMillis() - connectedTime;
        Notification notification = showNotification(BackgroundDaemon.this, "", Utils.getElapsedTimeInFormat(resultTime));
        notificationManager.notify(0x100, notification);
        // }
        if (handler != null) {
            handler.postDelayed(this, 1000);
        }
    }
};
  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答