java.lang.IllegalArgumentException

问题1:java.lang.IllegalArgumentException: Service not registered

原因:重复解绑

unbindService(connection)

问题2:java.lang.IllegalStateException: closed

场景:okhttp拦截器response.body.toString()后会被close,再次执行时会异常closed

问题3:java.lang.IllegalArgumentException: bad base-64

场景:android.util.Base64.decode(content,Base64.URL_SAFE)时报错

原因:content数据源有问题,当然场景和原因还有其他的。

问题4:   java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. Make sure your adapter calls notifyDataSetChanged() when its content changes. [in ListView(2131296524, class android.widget.ListView) with Adapter(class android.widget.HeaderViewListAdapter)]
  原因:当数据源发生改变,未进行adapter的更新,加上notifyDataSetChanged即可

问题5:更新中...


版权声明:本文为Poulfei原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。