Java. lang. IllegalArgumentException: The observer is null. Final Solution, isnull
Java. lang. IllegalArgumentException: The observer is null. Final Solution
When using data adaptation:
java.lang.IllegalArgumentException: The observer is null.at android.database.Observable.unregisterObserver(Observable.java:64)at android.widget.BaseAdapter.unregisterDataSetObserver(BaseAdapter.java:42)at android.widget.AbsListView.onDetachedFromWindow(AbsListView.java:2872)at android.view.View.dispatchDetachedFromWindow(View.java:11908)at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2647)at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2645)at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2645)at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2645)at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2645)at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2645)at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2645)at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2645)at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2645)at android.view.ViewRootImpl.dispatchDetachedFromWindow(ViewRootImpl.java:2685)at android.view.ViewRootImpl.doDie(ViewRootImpl.java:4044)at android.view.ViewRootImpl.die(ViewRootImpl.java:4027)at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:375)at android.view.WindowManagerImpl$CompatModeWrapper.removeViewImmediate(WindowManagerImpl.java:170)at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3352)at android.app.ActivityThread.access$1200(ActivityThread.java:140)at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1266)at android.os.Handler.dispatchMessage(Handler.java:99)at android.os.Looper.loop(Looper.java:137)at android.app.ActivityThread.main(ActivityThread.java:4914)at java.lang.reflect.Method.invokeNative(Native Method)at java.lang.reflect.Method.invoke(Method.java:511)at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:808)at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:575)at dalvik.system.NativeStart.main(Native Method)
The cause is BaseAdapter.
Solution: add the following code when using the extends BaseAdapter:
@Overridepublic void unregisterDataSetObserver(DataSetObserver observer) {if (observer != null) { super.unregisterDataSetObserver(observer); }}
Hope to help you. Come on!
Here is also me: my eoe blog address for this question
JavalangIllegalArgumentException: nullsource what is the problem?
Invalid parameter exception. The input parameter is invalid. For example, if the String is an Int value.
You can directly give an error without any source code. There are too many situations and there is no way to analyze them.
When Javascript is added to the web xhtml file, the error javalangIllegalArgumentException: null source is returned.
Invalid parameter exception. The input parameter is invalid. For example, if the String is an Int value.