Issues with LogCat - android

I was trying to make my first application, and I made 2 pages (LogoActivity (main one) and screen_2). I did not have any problems except with LogCat. I have no idea of what that is. If you can tell something about, I am be pleased to learn :).
This is the log file I got from Eclipse.
05-15 21:04:04.981: D/AndroidRuntime(382): Shutting down VM
05-15 21:04:04.981: W/dalvikvm(382): threadid=1: thread exiting with uncaught exception (group=0x40015560)
05-15 21:04:05.001: E/AndroidRuntime(382): FATAL EXCEPTION: main
05-15 21:04:05.001: E/AndroidRuntime(382): java.lang.RuntimeException: Unable to start activity ComponentInfo{eu.eyestudios.logo/eu.eyestudios.logo.LogoActivity}: java.lang.ClassCastException: android.widget.ImageButton
05-15 21:04:05.001: E/AndroidRuntime(382): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
05-15 21:04:05.001: E/AndroidRuntime(382): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
05-15 21:04:05.001: E/AndroidRuntime(382): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-15 21:04:05.001: E/AndroidRuntime(382): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
05-15 21:04:05.001: E/AndroidRuntime(382): at android.os.Handler.dispatchMessage(Handler.java:99)
05-15 21:04:05.001: E/AndroidRuntime(382): at android.os.Looper.loop(Looper.java:123)
05-15 21:04:05.001: E/AndroidRuntime(382): at android.app.ActivityThread.main(ActivityThread.java:3683)
05-15 21:04:05.001: E/AndroidRuntime(382): at java.lang.reflect.Method.invokeNative(Native Method)
05-15 21:04:05.001: E/AndroidRuntime(382): at java.lang.reflect.Method.invoke(Method.java:507)
05-15 21:04:05.001: E/AndroidRuntime(382): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-15 21:04:05.001: E/AndroidRuntime(382): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-15 21:04:05.001: E/AndroidRuntime(382): at dalvik.system.NativeStart.main(Native Method)
05-15 21:04:05.001: E/AndroidRuntime(382): Caused by: java.lang.ClassCastException: android.widget.ImageButton
05-15 21:04:05.001: E/AndroidRuntime(382): at eu.eyestudios.logo.LogoActivity.onCreate(LogoActivity.java:14)
05-15 21:04:05.001: E/AndroidRuntime(382): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-15 21:04:05.001: E/AndroidRuntime(382): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
05-15 21:04:05.001: E/AndroidRuntime(382): ... 11 more
Thanks a lot! :)

These lines
05-15 21:04:05.001: E/AndroidRuntime(382): Caused by: java.lang.ClassCastException: android.widget.ImageButton
05-15 21:04:05.001: E/AndroidRuntime(382): at eu.eyestudios.logo.LogoActivity.onCreate(LogoActivity.java:14)
tell you that you are trying to do a cast of an invalid type. Check the code around LogoActivity.java:14 to figure what's wrong with your cast.

The problem is in the imagebutton:
05-15 21:04:05.001: E/AndroidRuntime(382): Caused by: java.lang.ClassCastException: android.widget.ImageButton
I think you have not find image button by findviewbyid or you are taking wrong id for image button.like (ImageButton)findViewById(R.Id.***imagebutton**)..Check this id matches with image button id in xml.

Related

My app freezes crashes when it's supposed to go to the next activity

I don't know why the app crashes whenever it's supposed to go to the next Activity. I made a practice app that works as it should when using the same format. I uploaded the files to gist.github.
The error is
1216-1216/com.example.chiozokamalu.newfreshstart E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.ArrayIndexOutOfBoundsException
at com.example.chiozokamalu.newfreshstart.MainActivity.onClick(MainActivity.java:164)
at android.view.View.performClick(View.java:2485)
at android.view.View$PerformClick.run(View.java:9080)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
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)
On line 164 of MainActivity.java:
questionView.setText(questions[questionIndex]); // set the text to the next question
EDIT: After Varun helped me, I get a new error which is
1307-1307/com.example.chiozokamalu.newfreshstart E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.chiozokamalu.newfreshstart/com.example.chiozokamalu.newfreshstart.Results1}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
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)
Caused by: java.lang.NullPointerException
at com.example.chiozokamalu.newfreshstart.Results1.onCreate(Results1.java:58)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
            at android.app.ActivityThread.access$1500(ActivityThread.java:117)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:130)
            at android.app.ActivityThread.main(ActivityThread.java:3683)
            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)
The questions array at line no. 164 is going out of bound that means questionIndex is greater than the total length of the questions array. So you should add a check on the length before extracting value from the array.
You have added the check but after that you incremented the value so either you modify the if condition to if (questionIndex < questions.length -1)
or modify the questionIndex variable before the if condition
You are getting problem because you haven't initiated resultView9 that is why it is null and giving nullpointer, just initiatlise it as you done with other and everything is fine. You have initialised the resultView8 twice just add resultview9 over there

Error on android with different costum button

i have a error on my android project that i cant solve.
I have a game menu layout in one xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/RootView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#drawable/gamemenu_background"
android:orientation="vertical" >
<Button
android:id="#+id/gaveup_button"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="#drawable/gaveup_button">
</Button>
<Button
android:id="#+id/choice_a_button"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="#drawable/choice_a_button">
</Button>
<Button
android:id="#+id/choice_b_button"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="#drawable/choice_b_button"/>
</RelativeLayout>
So for each button i have an xml and an image in folder drawable:
choice_a_button_xml.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="#drawable/choice_a_button"></item>
</selector>
choice_b_button_xml.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="#drawable/choice_b_button"></item>
</selector>
In layout manager of eclipse de layout are good but when i run the app on a virtual device i have an error and app not start:
05-15 01:22:52.284: D/dalvikvm(341): GC freed 605 objects / 48664 bytes in 166ms
05-15 01:22:52.446: D/dalvikvm(341): GC freed 59 objects / 2304 bytes in 46ms
05-15 01:22:52.814: D/dalvikvm(341): GC freed 138 objects / 6344 bytes in 42ms
05-15 01:22:53.124: D/dalvikvm(341): GC freed 48 objects / 1864 bytes in 44ms
05-15 01:22:53.724: E/dalvikvm-heap(341): 3686400-byte external allocation too large for this process.
05-15 01:22:53.724: E/(341): VM won't let us allocate 3686400 bytes
05-15 01:22:53.724: D/skia(341): --- decoder->decode returned false
05-15 01:22:53.735: D/AndroidRuntime(341): Shutting down VM
05-15 01:22:53.735: W/dalvikvm(341): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
05-15 01:22:53.735: E/AndroidRuntime(341): Uncaught handler: thread main exiting due to uncaught exception
05-15 01:22:53.754: E/AndroidRuntime(341): java.lang.RuntimeException: Unable to start activity ComponentInfo{sal.app/sal.app.SALActivity}: android.view.InflateException: Binary XML file line #29: Error inflating class <unknown>
05-15 01:22:53.754: E/AndroidRuntime(341): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.os.Handler.dispatchMessage(Handler.java:99)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.os.Looper.loop(Looper.java:123)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.app.ActivityThread.main(ActivityThread.java:4363)
05-15 01:22:53.754: E/AndroidRuntime(341): at java.lang.reflect.Method.invokeNative(Native Method)
05-15 01:22:53.754: E/AndroidRuntime(341): at java.lang.reflect.Method.invoke(Method.java:521)
05-15 01:22:53.754: E/AndroidRuntime(341): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
05-15 01:22:53.754: E/AndroidRuntime(341): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
05-15 01:22:53.754: E/AndroidRuntime(341): at dalvik.system.NativeStart.main(Native Method)
05-15 01:22:53.754: E/AndroidRuntime(341): Caused by: android.view.InflateException: Binary XML file line #29: Error inflating class <unknown>
05-15 01:22:53.754: E/AndroidRuntime(341): at android.view.LayoutInflater.createView(LayoutInflater.java:513)
05-15 01:22:53.754: E/AndroidRuntime(341): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
05-15 01:22:53.754: E/AndroidRuntime(341): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.app.Activity.setContentView(Activity.java:1622)
05-15 01:22:53.754: E/AndroidRuntime(341): at sal.app.SALActivity.onCreate(SALActivity.java:23)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
05-15 01:22:53.754: E/AndroidRuntime(341): ... 11 more
05-15 01:22:53.754: E/AndroidRuntime(341): Caused by: java.lang.reflect.InvocationTargetException
05-15 01:22:53.754: E/AndroidRuntime(341): at android.widget.Button.<init>(Button.java:65)
05-15 01:22:53.754: E/AndroidRuntime(341): at java.lang.reflect.Constructor.constructNative(Native Method)
05-15 01:22:53.754: E/AndroidRuntime(341): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.view.LayoutInflater.createView(LayoutInflater.java:500)
05-15 01:22:53.754: E/AndroidRuntime(341): ... 22 more
05-15 01:22:53.754: E/AndroidRuntime(341): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
05-15 01:22:53.754: E/AndroidRuntime(341): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:447)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.content.res.Resources.loadDrawable(Resources.java:1705)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.view.View.<init>(View.java:1850)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.widget.TextView.<init>(TextView.java:326)
05-15 01:22:53.754: E/AndroidRuntime(341): at android.widget.Button.<init>(Button.java:69)
05-15 01:22:53.754: E/AndroidRuntime(341): ... 26 more
05-15 01:22:53.774: I/dalvikvm(341): threadid=7: reacting to signal 3
05-15 01:22:53.774: E/dalvikvm(341): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
Whats happen there? This error only ocurre in virtual devices with large screens.
This app work if i set Max VM application heap size of my virtual device to 48. But this is too much..There is any way to put program consumes less memory?
please help me
What #Michaeldcooney said and you should also check for memory leaks. Also, what's the VM memory size (that's the size of memory usable by an application, not the device total memory size) for your virtual devices?
I think the crash is due to the line that says:
Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
You probably need to scale down your images.

Android Fragments with compatible library

I can't make it work.
I found many similar question here, examples. But nothing help and nothing work.
Does anyone have a working Fragments in Android 2.2 with android.support.v4 library? (If you are please upload it somewhere.)
I'm almost crying because I can't find what's wrong!
The error is the same as many of people have:
05-15 18:20:20.583: W/dalvikvm(1521): Unable to resolve superclass of Lmy/fragment/test/FragmentTestActivity; (8)
05-15 18:20:20.583: W/dalvikvm(1521): Link of class 'Lmy/fragment/test/FragmentTestActivity;' failed
05-15 18:20:20.593: D/AndroidRuntime(1521): Shutting down VM
05-15 18:20:20.593: W/dalvikvm(1521): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
05-15 18:20:20.703: E/AndroidRuntime(1521): FATAL EXCEPTION: main
05-15 18:20:20.703: E/AndroidRuntime(1521): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{my.fragment.test/my.fragment.test.FragmentTestActivity}: java.lang.ClassNotFoundException: my.fragment.test.FragmentTestActivity in loader dalvik.system.PathClassLoader[/data/app/my.fragment.test-1.apk]
05-15 18:20:20.703: E/AndroidRuntime(1521): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
05-15 18:20:20.703: E/AndroidRuntime(1521): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
05-15 18:20:20.703: E/AndroidRuntime(1521): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
05-15 18:20:20.703: E/AndroidRuntime(1521): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
05-15 18:20:20.703: E/AndroidRuntime(1521): at android.os.Handler.dispatchMessage(Handler.java:99)
05-15 18:20:20.703: E/AndroidRuntime(1521): at android.os.Looper.loop(Looper.java:123)
05-15 18:20:20.703: E/AndroidRuntime(1521): at android.app.ActivityThread.main(ActivityThread.java:4627)
05-15 18:20:20.703: E/AndroidRuntime(1521): at java.lang.reflect.Method.invokeNative(Native Method)
05-15 18:20:20.703: E/AndroidRuntime(1521): at java.lang.reflect.Method.invoke(Method.java:521)
05-15 18:20:20.703: E/AndroidRuntime(1521): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-15 18:20:20.703: E/AndroidRuntime(1521): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-15 18:20:20.703: E/AndroidRuntime(1521): at dalvik.system.NativeStart.main(Native Method)
05-15 18:20:20.703: E/AndroidRuntime(1521): Caused by: java.lang.ClassNotFoundException: my.fragment.test.FragmentTestActivity in loader dalvik.system.PathClassLoader[/data/app/my.fragment.test-1.apk]
05-15 18:20:20.703: E/AndroidRuntime(1521): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
05-15 18:20:20.703: E/AndroidRuntime(1521): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
05-15 18:20:20.703: E/AndroidRuntime(1521): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
05-15 18:20:20.703: E/AndroidRuntime(1521): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
05-15 18:20:20.703: E/AndroidRuntime(1521): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
05-15 18:20:20.703: E/AndroidRuntime(1521): ... 11 more
05-15 18:20:23.423: I/Process(1521): Sending signal. PID: 1521 SIG: 9
SOLVED!!!! Who have this warnings before error:
05-16 10:08:00.033: W/dalvikvm(1695): Unable to resolve superclass of Lmy/fragment/test/FragmentTestActivity; (7)
05-16 10:08:00.076: W/dalvikvm(1695): Link of class 'Lmy/fragment/test/FragmentTestActivity;' failed
Should export android-support-v4 to right to your app:
Configure Java Build Path -> Order And Export tab -> set checkbox android-support-v4.jar
(Maybe need to remove existing one firstly)
it will moves this library to your apk (as I understand it)
You should have 1 FragmentActivity with fragments inside. What you are doing is trying to put activities (fragmentactivity) inside xml. That wont work. Try to only have 1 top level fragmentactivity and then make the other into fragments and then put those fragments inside your xml.
Since you are obviously just learning about this I'll expand on Warpzit's answer to try and help you out (you should accept his answer so he gets credit, since it is the correct one and he answered first).
This:
public class DetailsActivity extends FragmentActivity
Needs to be this:
public class DetailsActivity extends Fragment
As do any other tabs you want to display as part of that first activity.
There should only be one FragmentActivity unless you are going to start a second activity (and leave the first) that will also have fragments, then the same applies.
why do you have two activities named FragmentTestActivity? or is just writing error?
have you declared it in manifest?
Try to replace android:name="classpath" with class=""classpath.

NullPointerException in com.reg.project

I have no Idea why I get this error :/
Exception class java.lang.NullPointerException
Source method Jax$7.onClick()
java.lang.NullPointerException
at com.reg.lolsoundboard.Jax$7.onClick(Jax.java:83)
at android.view.View.performClick(View.java:2485)
at android.view.View$PerformClick.run(View.java:9089)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3806)
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)
Obviously you are dereferencing a variable in line 83 of the file Jax.java where the variable is null.
java.lang.NullPointerException
at com.reg.lolsoundboard.Jax$7.onClick(Jax.java:83)
If show the relevant code, people may be able to help you.

java.lang.OutOfMemoryError bitmap create?

I just got this stack trace from the marketplace error reporting and have no idea where to being to track the problem down, any help appreciated.
java.lang.OutOfMemoryError: bitmap size exceeds VM budget
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:477)
at android.graphics.Bitmap.createBitmap(Bitmap.java:444)
at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:349)
at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:463)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:326)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
at android.content.res.Resources.loadDrawable(Resources.java:1709)
at android.content.res.Resources.getDrawable(Resources.java:581)
at com.android.internal.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:440)
at com.android.internal.view.menu.IconMenuItemView.initialize(IconMenuItemView.java:109)
at com.android.internal.view.menu.MenuItemImpl.createItemView(MenuItemImpl.java:594)
at com.android.internal.view.menu.MenuItemImpl.getItemView(MenuItemImpl.java:577)
at com.android.internal.view.menu.IconMenuView.updateChildren(IconMenuView.java:351)
at com.android.internal.view.menu.IconMenuView.initialize(IconMenuView.java:333)
at com.android.internal.view.menu.MenuBuilder$MenuType.getMenuView(MenuBuilder.java:199)
at com.android.internal.view.menu.MenuBuilder.getMenuView(MenuBuilder.java:323)
at com.android.internal.policy.impl.PhoneWindow.initializePanelContent(PhoneWindow.java:858)
at com.android.internal.policy.impl.PhoneWindow.openPanel(PhoneWindow.java:435)
at com.android.internal.policy.impl.PhoneWindow.onKeyUpPanel(PhoneWindow.java:621)
at com.android.internal.policy.impl.PhoneWindow.onKeyUp(PhoneWindow.java:1339)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1668)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:789)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:789)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:789)
at android.widget.TabHost.dispatchKeyEvent(TabHost.java:278)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:789)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:789)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:1687)
at com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1120)
at android.app.Activity.dispatchKeyEvent(Activity.java:2073)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1663)
at android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:2560)
at android.view.ViewRoot.handleFinishedEvent(ViewRoot.java:2535)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1867)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3647)
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)
I'm getting the same error on an application I've developed for Android 2.1 and Android 2.2 but run on Android 4.0.1 ICS. The same app would run on Android 2.1 but cause a crash with the above error on ICS. If you're drawing something relatively big to the size of the screen, consider checking from that place.

Categories

Resources