无法启动广播意图应用

时间:2011-01-19 20:46:37

标签: android android-widget widget logcat android-logcat

我写了一个小时钟部件。像所有时钟一样,它必须每分钟更新一次。所以我设置了警报来做到这一点。它工作正常。这有点太小了。所以我摆弄了一个XML属性并再次尝试。它强行关闭。我将属性更改回原始属性并再次尝试。它再次强制关闭。

LogCat遵循(从包安装到操作系统杀死它):

01-19 13:38:52.292: DEBUG/PackageManager(57): New package installed in /data/app/com.---.clock-2.apk
01-19 13:38:52.571: INFO/ActivityManager(57): Force stopping package com.---.clock uid=10043
01-19 13:38:52.571: INFO/Process(57): Sending signal. PID: 593 SIG: 9
01-19 13:38:52.612: INFO/ActivityManager(57): Force stopping package com.---.clock uid=10043
01-19 13:38:53.022: DEBUG/PhotoAppWidgetProvider(282): getPhoto query count=0
01-19 13:38:53.022: DEBUG/PhotoAppWidgetProvider(282): sending out views=null for id=0
01-19 13:38:53.131: INFO/ActivityManager(57): Start proc com.---.clock for broadcast com.---.clock/.Clock: pid=613 uid=10043 gids={1015}
01-19 13:38:53.713: DEBUG/Clock widget(613): updated
01-19 13:38:54.011: INFO/ActivityManager(57): Force stopping package com.---.clock uid=10043
01-19 13:38:54.021: INFO/Process(57): Sending signal. PID: 613 SIG: 9
01-19 13:38:54.301: DEBUG/dalvikvm(121): GC_EXPLICIT freed 13673 objects / 524360 bytes in 177ms
01-19 13:38:54.542: DEBUG/dalvikvm(125): GC_EXPLICIT freed 4956 objects / 200960 bytes in 440ms
01-19 13:38:54.801: WARN/RecognitionManagerService(57): no available voice recognition services found
01-19 13:38:55.032: DEBUG/dalvikvm(57): GC_EXPLICIT freed 4960 objects / 290104 bytes in 201ms
01-19 13:38:55.042: INFO/installd(35): unlink /data/dalvik-cache/data@app@com.---.clock-1.apk@classes.dex
01-19 13:38:55.131: DEBUG/AndroidRuntime(605): Shutting down VM
01-19 13:38:55.151: DEBUG/dalvikvm(605): Debugger has detached; object registry had 1 entries
01-19 13:38:55.212: INFO/AndroidRuntime(605): NOTE: attach of thread 'Binder Thread #3' failed
01-19 13:38:55.571: DEBUG/PhotoAppWidgetProvider(282): getPhoto query count=0
01-19 13:38:55.571: DEBUG/PhotoAppWidgetProvider(282): sending out views=null for id=0
01-19 13:38:55.762: INFO/ActivityManager(57): Start proc com.---.clock for broadcast com.---.clock/.Clock: pid=622 uid=10043 gids={1015}
01-19 13:38:56.332: WARN/asset(622): Asset path /data/app/com.---.clock-1.apk is neither a directory nor file (type=1).
01-19 13:38:56.373: DEBUG/AndroidRuntime(622): Shutting down VM
01-19 13:38:56.373: WARN/dalvikvm(622): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
01-19 13:38:56.722: DEBUG/PhotoAppWidgetProvider(282): getPhoto query count=0
01-19 13:38:56.732: DEBUG/PhotoAppWidgetProvider(282): sending out views=null for id=0
01-19 13:38:56.841: ERROR/AndroidRuntime(622): FATAL EXCEPTION: main
01-19 13:38:56.841: ERROR/AndroidRuntime(622): java.lang.RuntimeException: Unable to instantiate receiver com.---.clock.Clock: java.lang.ClassNotFoundException: com.---.clock.Clock in loader dalvik.system.PathClassLoader[/data/app/com.---.clock-1.apk]
01-19 13:38:56.841: ERROR/AndroidRuntime(622):     at android.app.ActivityThread.handleReceiver(ActivityThread.java:2789)
01-19 13:38:56.841: ERROR/AndroidRuntime(622):     at android.app.ActivityThread.access$3200(ActivityThread.java:125)
01-19 13:38:56.841: ERROR/AndroidRuntime(622):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2083)
01-19 13:38:56.841: ERROR/AndroidRuntime(622):     at android.os.Handler.dispatchMessage(Handler.java:99)
01-19 13:38:56.841: ERROR/AndroidRuntime(622):     at android.os.Looper.loop(Looper.java:123)
01-19 13:38:56.841: ERROR/AndroidRuntime(622):     at android.app.ActivityThread.main(ActivityThread.java:4627)
01-19 13:38:56.841: ERROR/AndroidRuntime(622):     at java.lang.reflect.Method.invokeNative(Native Method)
01-19 13:38:56.841: ERROR/AndroidRuntime(622):     at java.lang.reflect.Method.invoke(Method.java:521)
01-19 13:38:56.841: ERROR/AndroidRuntime(622):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-19 13:38:56.841: ERROR/AndroidRuntime(622):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-19 13:38:56.841: ERROR/AndroidRuntime(622):     at dalvik.system.NativeStart.main(Native Method)
01-19 13:38:56.841: ERROR/AndroidRuntime(622): Caused by: java.lang.ClassNotFoundException: com.---.clock.Clock in loader dalvik.system.PathClassLoader[/data/app/com.---.clock-1.apk]
01-19 13:38:56.841: ERROR/AndroidRuntime(622):     at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
01-19 13:38:56.841: ERROR/AndroidRuntime(622):     at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
01-19 13:38:56.841: ERROR/AndroidRuntime(622):     at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
01-19 13:38:56.841: ERROR/AndroidRuntime(622):     at android.app.ActivityThread.handleReceiver(ActivityThread.java:2780)
01-19 13:38:56.841: ERROR/AndroidRuntime(622):     ... 10 more
01-19 13:38:56.901: WARN/asset(57): Asset path /data/app/com.---.clock-1.apk is neither a directory nor file (type=1).
01-19 13:38:56.913: WARN/PackageManager(57): Failure retrieving resources forcom.---.clock
01-19 13:38:57.932: DEBUG/PhotoAppWidgetProvider(282): getPhoto query count=0
01-19 13:38:58.003: DEBUG/PhotoAppWidgetProvider(282): sending out views=null for id=0
01-19 13:39:05.101: INFO/Process(622): Sending signal. PID: 622 SIG: 9
01-19 13:39:05.151: INFO/ActivityManager(57): Process com.---.clock (pid 622) has died.
01-19 13:39:05.182: WARN/InputManagerService(57): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@43ecc698
01-19 13:39:05.892: DEBUG/PhotoAppWidgetProvider(282): getPhoto query count=0
01-19 13:39:05.892: DEBUG/PhotoAppWidgetProvider(282): sending out views=null for id=0
01-19 13:39:06.011: INFO/ActivityManager(57): Start proc com.---.clock for broadcast com.---.clock/.Clock: pid=630 uid=10043 gids={1015}
01-19 13:39:06.413: WARN/asset(630): Asset path /data/app/com.---.clock-1.apk is neither a directory nor file (type=1).
01-19 13:39:06.472: DEBUG/AndroidRuntime(630): Shutting down VM
01-19 13:39:06.482: WARN/dalvikvm(630): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): FATAL EXCEPTION: main
01-19 13:39:06.901: ERROR/AndroidRuntime(630): java.lang.RuntimeException: Unable to instantiate receiver com.---.clock.Clock: java.lang.ClassNotFoundException: com.---.clock.Clock in loader dalvik.system.PathClassLoader[/data/app/com.---.clock-1.apk]
01-19 13:39:06.901: ERROR/AndroidRuntime(630):     at android.app.ActivityThread.handleReceiver(ActivityThread.java:2789)
01-19 13:39:06.901: ERROR/AndroidRuntime(630):     at android.app.ActivityThread.access$3200(ActivityThread.java:125)
01-19 13:39:06.901: ERROR/AndroidRuntime(630):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2083)
01-19 13:39:06.901: ERROR/AndroidRuntime(630):     at android.os.Handler.dispatchMessage(Handler.java:99)
01-19 13:39:06.901: ERROR/AndroidRuntime(630):     at android.os.Looper.loop(Looper.java:123)
01-19 13:39:06.901: ERROR/AndroidRuntime(630):     at android.app.ActivityThread.main(ActivityThread.java:4627)
01-19 13:39:06.901: ERROR/AndroidRuntime(630):     at java.lang.reflect.Method.invokeNative(Native Method)
01-19 13:39:06.901: ERROR/AndroidRuntime(630):     at java.lang.reflect.Method.invoke(Method.java:521)
01-19 13:39:06.901: ERROR/AndroidRuntime(630):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-19 13:39:06.901: ERROR/AndroidRuntime(630):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-19 13:39:06.901: ERROR/AndroidRuntime(630):     at dalvik.system.NativeStart.main(Native Method)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): Caused by: java.lang.ClassNotFoundException: com.---.clock.Clock in loader dalvik.system.PathClassLoader[/data/app/com.---.clock-1.apk]
01-19 13:39:06.901: ERROR/AndroidRuntime(630):     at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
01-19 13:39:06.901: ERROR/AndroidRuntime(630):     at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
01-19 13:39:06.901: ERROR/AndroidRuntime(630):     at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
01-19 13:39:06.901: ERROR/AndroidRuntime(630):     at android.app.ActivityThread.handleReceiver(ActivityThread.java:2780)
01-19 13:39:06.901: ERROR/AndroidRuntime(630):     ... 10 more
01-19 13:39:06.901: DEBUG/PhotoAppWidgetProvider(282): getPhoto query count=0
01-19 13:39:06.922: DEBUG/PhotoAppWidgetProvider(282): sending out views=null for id=0
01-19 13:39:07.051: WARN/ActivityManager(57): Process com.---.clock has crashed too many times: killing!
01-19 13:39:07.062: INFO/Process(57): Sending signal. PID: 630 SIG: 9
01-19 13:39:07.151: WARN/ActivityManager(57): Unable to launch app com.---.clock/10043 for broadcast Intent { act=android.appwidget.action.APPWIDGET_UPDATE cmp=com.---.clock/.Clock (has extras) }: process is bad
01-19 13:39:07.151: WARN/ActivityManager(57): finishReceiver called but none active

我之前从未见过这个错误,也不知道是什么导致它或如何解决它。有人能解释一下吗?

1 个答案:

答案 0 :(得分:13)

无论出于何种原因,(MAGIC!)重新启动模拟器都有效。我仍然不知道为什么它首先搞砸了,但重启工作了。