我是靠谱客的博主 年轻石头,最近开发中收集的这篇文章主要介绍错误:java.lang.IllegalArgumentException: Receiver not registered,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

 Caused by: java.lang.IllegalArgumentException: Receiver not registered: com.multak.cookaraclient.MainActivi$NetState@3f3a124
 at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:861)
 at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1352)
 at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:576)
 at .MainActivity.onStop(MainActivity.java:493)
 at android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1288)
 at android.app.Activity.performStop(Activity.java:6534)
 at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:35
 at android.app.ActivityThread.handleStopActivity(ActivityThread.java:3588) 
 at android.app.ActivityThread.access$1200(ActivityThread.java:165) 
 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1404) 
 at android.os.Handler.dispatchMessage(Handler.java:102) 
 at android.os.Looper.loop(Looper.java:150) 

修改:在OnCreate注册时,就在 OnDeatory 反注册。保证(register, unregister)成对出现

转载于:https://www.cnblogs.com/galibujianbusana/p/7383799.html

最后

以上就是年轻石头为你收集整理的错误:java.lang.IllegalArgumentException: Receiver not registered的全部内容,希望文章能够帮你解决错误:java.lang.IllegalArgumentException: Receiver not registered所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(67)

评论列表共有 0 条评论

立即
投稿
返回
顶部