Skip to content Skip to sidebar Skip to footer

Illegalargumentexception Not Catched

A very strange error...I register and unregister a receiver in the onResume() and onPause() methods. Here is the code in the onStop() method: try{ this.unregisterReceiv

Solution 1:

I assume that exeption you have got is not thrown from your code, or even from Activity class code, but has been created at some system level library, so there is no way to handle it properly.

Here you find workaround: Android - BroadcastReceiver unregisterReceiver issue (not registered)

Solution 2:

If you are using a local broadcast then try this

onPause(){
  LocalBroadcastManager.getInstance(this).unregisterReceiver(broadcastReceiver);
  }

Post a Comment for "Illegalargumentexception Not Catched"