Roger
Roger

Reputation: 4259

Widget Exception on Power On

My app has a home screen widget. When I power on the phone (from off, not sleep) I get a fatal exception.

04-06 14:33:59.739: ERROR/AndroidRuntime(271): java.lang.RuntimeException: Unable to instantiate receiver com.mytest.myapp.AppWidget: java.lang.ClassNotFoundException: com.mytest.myapp.AppWidget in loader dalvik.system.PathClassLoader[/data/app/com.mytest.myapp-2.apk]

04-06 14:33:59.832: ERROR/AndroidRuntime(269): Caused by: java.lang.ClassNotFoundException: com.mytest.myapp.AppWidget in loader dalvik.system.PathClassLoader[/data/app/com.mytest.myapp-2.apk]

If I click the app to start it again, it works fine. Any idea on what is happening?

Upvotes: 1

Views: 197

Answers (1)

Phil Lello
Phil Lello

Reputation: 8639

It would be useful to see the Manifest.mf, just in case there's a typo lurking in there.

Failing that, the only explanation that leaps to mind is that the phone is trying to launch the app before /data is mounted. Can you reproduce in the emulator?

Phil Lello

Upvotes: 1

Related Questions