[BUG记录]java.lang.IllegalArgumentException: The observer is null.异常解决方案
摘要:今天在调用LinearLayout的removeAll方法时出现一个奇怪的bug,java.lang.IllegalArgumentException: The observer is null.android2.3正常,而android4.0出现。后来经过研究发现是因为4.0系统android.widget.AbsListView.onDetachedFromWindow第一次调用的时候会把observer设置为null,onDetachedFromWindow方法的作用是当view离开窗口时调用,而我在每次view离开窗口并没有销毁,因为后面要用到,所以当第二次重用view的时候在remo
阅读全文
posted @
2013-04-20 09:53
Android最前线
阅读(718)
推荐(0)
[BUG记录]java.lang.IllegalArgumentException: contentIntent required
摘要:今天遇到一个异常,在notificationManager.notify的时候发生java.lang.IllegalArgumentException: contentIntent required,原因是我个没有设置contentIntent。以前一直在4.0的机子上跑是没有问题的,在2.3、2.2上就会出现异常。所以还是要设置contentIntent,只是Intents设置不同的动作,contentIntent不可以设为空!!!例如: NotificationManager mNotifMgr = (NotificationManager)cn.getSystemServi...
阅读全文
posted @
2013-04-18 11:29
Android最前线
阅读(2114)
推荐(0)