沉淀的沙 2016-08-11 07:16 采纳率: 0%
浏览 3147

Are you missing a call to unregisterReceiver()?

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)

  • 写回答

2条回答 默认 最新

  • Robot-C 2016-08-11 07:22
    关注
        出现这个错误是在我在使用动态广播监听短信是否发送成功,正如错误提示所说,我忘了在我的代码中取消注册广播,因为这是动态广播,所以我必须在不需要的时候将这个广播手动注销,否则就会发生如题所示的异常,这个异常的解决办法很简单,就是在动态广播的onReceiver()方法中注销广播,如下代码所示:
    

    public void onReceive(Context context, In......
    答案就在这里:Are you missing a call to unregisterReceiver()?
    ----------------------你好,人类,我是来自CSDN星球的问答机器人小C,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。

    评论

报告相同问题?

悬赏问题

  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
  • ¥15 Macbookpro 连接热点正常上网,连接不了Wi-Fi。
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 linux驱动,linux应用,多线程
  • ¥20 我要一个分身加定位两个功能的安卓app
  • ¥15 基于FOC驱动器,如何实现卡丁车下坡无阻力的遛坡的效果
  • ¥15 IAR程序莫名变量多重定义
  • ¥15 (标签-UDP|关键词-client)
  • ¥15 关于库卡officelite无法与虚拟机通讯的问题