<span style="font-family: 'Microsoft YaHei'; white-space: pre-wrap;">出现这个错误是在我在使用动态广播监听短信是否发送成功,正如错误提示所说,我忘了在我的代码中取消注册广播,因为这是动态广播,所以我必须在不需要的时候将这个广播手动注销,否则就会发生如题所示的异常,这个异常的解决办法很简单,就是在动态广播的onReceiver()方法中注销广播,如下代码所示:</span>
public void onReceive(Context context, Intent intent) { context.unregisterReceiver(this); } }
这样就在广播成功接收后注销掉了广播,避免了异常的产生。
Are you missing a call to unregisterReceiver()?
原文地址:http://blog.csdn.net/studynote/article/details/38816835