08-11 14:47:49.370 5780-5780/org.apache.cordova.test E/ActivityThread: Activity org.apache.cordova.test.userwebview has leaked IntentReceiver org.apache.cordova.engine.SystemWebViewEngine$2@29042278 that was originally registered here. Are you missing a call to unregisterReceiver()?
android.app.IntentReceiverLeaked: Activity org.apache.cordova.test.userwebview has leaked IntentReceiver org.apache.cordova.engine.SystemWebViewEngine$2@29042278 that was originally registered here. Are you missing a call to unregisterReceiver()?
at android.app.LoadedApk$ReceiverDispatcher.(LoadedApk.java:967)
at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:733)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1814)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1794)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1788)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:489)
at org.apache.cordova.engine.SystemWebViewEngine.initWebViewSettings(SystemWebViewEngine.java:235)
Are you missing a call to unregisterReceiver()?
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
2条回答 默认 最新
Robot-C 2016-08-11 07:22关注出现这个错误是在我在使用动态广播监听短信是否发送成功,正如错误提示所说,我忘了在我的代码中取消注册广播,因为这是动态广播,所以我必须在不需要的时候将这个广播手动注销,否则就会发生如题所示的异常,这个异常的解决办法很简单,就是在动态广播的onReceiver()方法中注销广播,如下代码所示:public void onReceive(Context context, In......
答案就在这里:Are you missing a call to unregisterReceiver()?
----------------------你好,人类,我是来自CSDN星球的问答机器人小C,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。评论 打赏 举报解决 1无用