当我的应用程序崩溃时,我在logcat中发现了以下错误。但我不明白错误究竟意味着什么。如果有人知道请解释为什么这个崩溃发生。此外,崩溃只发生在某个时候。
java.lang.IllegalArgumentException: Receiver not registered: android.widget.ViewFlipper$1@4052cd98
at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:634)
at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:875)
at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:331)
at android.widget.ViewFlipper.onDetachedFromWindow(ViewFlipper.java:104)
at android.view.View.dispatchDetachedFromWindow(View.java:6235)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1250)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1248)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1248)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1248)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1248)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1248)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1248)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1248)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1248)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1248)
at android.view.ViewRoot.dispatchDetachedFromWindow(ViewRoot.java:1838)
at android.view.ViewRoot.doDie(ViewRoot.java:2916)
at android.view.ViewRoot.die(ViewRoot.java:2886)
at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:254)
at android.view.Window$LocalWindowManager.removeViewImmediate(Window.java:445)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3182)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3287)
at android.app.ActivityThread.access$1600(ActivityThread.java:132)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1042)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4293)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
答案 0 :(得分:1)
我在我开发的应用程序中看到了Android Market报告的这个确切错误。根据我的理解,这个问题实际上来自于Android中的一个错误,当ViewFlipper可见时(或者在极少数情况下,即使没有ViewFlipper可见),有时也会发生错误。该错误已注册here,讨论将引发一个名为SafeViewFlipper的类,可用于代替ViewFlipper。我没有使用此修复程序发布我的应用程序版本,但是我可以在错误报告和其他地方看到的内容中使用它非常成功。
答案 1 :(得分:0)
在Manifest文件(Manifest.xml)中,您应该添加Receiver
。
如果您将Eclipse与ADT插件一起使用,请打开Manifest.xml并转到Application
选项卡。
在这里,您可以添加活动,服务,提供商和接收者。