沉淀的沙 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,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。

    评论

报告相同问题?

悬赏问题

  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛