BaijnathG / mytracks

Automatically exported from code.google.com/p/mytracks
0 stars 0 forks source link

Force Close error due to unlocated menu icons #313

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We crash on some phones (notably, ones with small, low-resolution screens) 
because we can't find the menu icons.  The icons live in drawables-[hlm]dpi, 
but not in drawables.  Moving the icons from drawables-ldpi to drawables fixes 
the problem.

Here's the trace

2-10 11:58:19.613 W/dalvikvm( 1249): threadid=3: thread exiting with uncaught 
exception (group=0x40013140)
02-10 11:58:19.613 E/AndroidRuntime( 1249): Uncaught handler: thread main 
exiting due to uncaught exception
02-10 11:58:19.623 E/AndroidRuntime( 1249): 
android.content.res.Resources$NotFoundException: Resource ID #0x7f02001b
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
android.content.res.Resources.getValue(Resources.java:862)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
android.content.res.Resources.getDrawable(Resources.java:550)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:432)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.view.menu.IconMenuItemView.initialize(IconMenuItemView.java
:109)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.view.menu.MenuItemImpl.createItemView(MenuItemImpl.java:586
)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.view.menu.MenuItemImpl.getItemView(MenuItemImpl.java:569)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.view.menu.IconMenuView.updateChildren(IconMenuView.java:345
)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.view.menu.IconMenuView.initialize(IconMenuView.java:327)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.view.menu.MenuBuilder$MenuType.getMenuView(MenuBuilder.java
:198)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.view.menu.MenuBuilder.getMenuView(MenuBuilder.java:322)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.policy.impl.PhoneWindow.initializePanelContent(PhoneWindow.
java:930)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.policy.impl.PhoneWindow.openPanel(PhoneWindow.java:528)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.policy.impl.PhoneWindow.onKeyUpPanel(PhoneWindow.java:693)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.policy.impl.PhoneWindow.onKeyUp(PhoneWindow.java:1367)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWin
dow.java:1684)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:770)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:770)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:770)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
android.widget.TabHost.dispatchKeyEvent(TabHost.java:265)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:770)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:770)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(Pho
neWindow.java:1703)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.j
ava:1192)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
android.app.Activity.dispatchKeyEvent(Activity.java:1973)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWin
dow.java:1679)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:2212)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
android.view.ViewRoot.handleFinishedEvent(ViewRoot.java:2182)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
android.view.ViewRoot.handleMessage(ViewRoot.java:1494)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
android.os.Handler.dispatchMessage(Handler.java:99)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
android.os.Looper.loop(Looper.java:123)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
android.app.ActivityThread.main(ActivityThread.java:3948)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
java.lang.reflect.Method.invokeNative(Native Method)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
java.lang.reflect.Method.invoke(Method.java:521)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
02-10 11:58:19.623 E/AndroidRuntime( 1249): at 
dalvik.system.NativeStart.main(Native Method)

Original issue reported on code.google.com by simmonmt@google.com on 10 Feb 2011 at 8:53

GoogleCodeExporter commented 9 years ago
After further investigation, this seems to be a Cupcake-only issue.  
drawable-[hml]dpi were introduced in API rev 4, per 
http://developer.android.com/guide/topics/resources/providing-resources.html

As such, drawables hidden away in drawable-[hml]dpi are invisible to Cupcake.  
I propose moving the ldpi drawables to drawable.  An alternative (though not as 
space-efficient) would be to copy the drawables from ldpi to drawable.

Original comment by simmonmt@google.com on 10 Feb 2011 at 9:10

GoogleCodeExporter commented 9 years ago
The fix for this issue is available in simmonmt-staging4
Verified on Cupcake, Donut, Eclair emulators, Gingerbread phone (NS)

http://code.google.com/r/simmonmt-staging4/source/detail?r=465d069ec429c2f6660b4
3ba7b7f0c7530a0ebeb

Original comment by simmonmt@google.com on 10 Feb 2011 at 9:18

GoogleCodeExporter commented 9 years ago

Original comment by simmonmt@google.com on 11 Feb 2011 at 4:39