I want to call activity, where user can choose area of picture and set it as wallpaper
I have some problem with it. My code is:
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_ATTACH_DATA);
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.background);
shareIntent.putExtra(Intent.EXTRA_STREAM, bitmap);
shareIntent.setType("image/jpeg");
startActivity(shareIntent);
but when I choose set as wallpaper, gallery is stop working (Android 2.3), or (Android 4.0) "set as" menu doesn't displayed.
Android 2.3 LogCat (this errors in com.cooliris.media package):
12-13 16:20:27.509: E/AndroidRuntime(14414): FATAL EXCEPTION: main
12-13 16:20:27.509: E/AndroidRuntime(14414): java.lang.NullPointerException
12-13 16:20:27.509: E/AndroidRuntime(14414): at android.app.ActivityThread.handleStopActivity(ActivityThread.java:2593)
12-13 16:20:27.509: E/AndroidRuntime(14414): at android.app.ActivityThread.access$1800(ActivityThread.java:123)
12-13 16:20:27.509: E/AndroidRuntime(14414): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:953)
12-13 16:20:27.509: E/AndroidRuntime(14414): at android.os.Handler.dispatchMessage(Handler.java:99)
12-13 16:20:27.509: E/AndroidRuntime(14414): at android.os.Looper.loop(Looper.java:130)
12-13 16:20:27.509: E/AndroidRuntime(14414): at android.app.ActivityThread.main(ActivityThread.java:3835)
12-13 16:20:27.509: E/AndroidRuntime(14414): at java.lang.reflect.Method.invokeNative(Native Method)
12-13 16:20:27.509: E/AndroidRuntime(14414): at java.lang.reflect.Method.invoke(Method.java:507)
12-13 16:20:27.509: E/AndroidRuntime(14414): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
12-13 16:20:27.509: E/AndroidRuntime(14414): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
12-13 16:20:27.509: E/AndroidRuntime(14414): at dalvik.system.NativeStart.main(Native Method)
12-13 16:20:27.529: W/ActivityManager(225): Force finishing activity com.cooliris.media/.Photographs
Android 4.0 LogCat
12-13 11:26:44.722: E/JavaBinder(12822): !!! FAILED BINDER TRANSACTION !!!
Sorry for my bad english.
Related
So what im trying to do is use an ImageButton with and onClick to open the android side menu but i keep getting an error.
home.xml (where the ImageButton is located with the onClick)
<ImageButton
android:id="#+id/imgViewRefresh4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="100dp"
android:visibility="gone"
android:onClick="click1"
style="?android:attr/borderlessButtonStyle"
android:src="#drawable/slide4" />
MainActivity.java (where the onClick is called)
public void click1(){
mDrawerLayout.openDrawer(mDrawerList);
}
Logcat error
12-13 21:38:01.276 3949-3949/com.projects.quickyAB E/AndroidRuntime: FATAL EXCEPTION: main
12-13 21:38:01.276 3949-3949/com.projects.quickyAB E/AndroidRuntime: java.lang.IllegalStateException: Could not find a method click1(View) in the activity class com.projects.quickyAB.MainActivity for onClick handler on view class android.widget.ImageButton with id 'imgViewRefresh4'
12-13 21:38:01.276 3949-3949/com.projects.quickyAB E/AndroidRuntime: at android.view.View$1.onClick(View.java:3825)
12-13 21:38:01.276 3949-3949/com.projects.quickyAB E/AndroidRuntime: at android.view.View.performClick(View.java:4475)
12-13 21:38:01.276 3949-3949/com.projects.quickyAB E/AndroidRuntime: at android.view.View$PerformClick.run(View.java:18796)
12-13 21:38:01.276 3949-3949/com.projects.quickyAB E/AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:730)
12-13 21:38:01.276 3949-3949/com.projects.quickyAB E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:92)
12-13 21:38:01.276 3949-3949/com.projects.quickyAB E/AndroidRuntime: at android.os.Looper.loop(Looper.java:137)
12-13 21:38:01.276 3949-3949/com.projects.quickyAB E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5455)
You have to change your method like this to handle the click
public void click1(View v){
mDrawerLayout.openDrawer(mDrawerList);
}
This is the entire stacktace from Logcat. I'm basically using the twitter4j library. I've added my tokens and secrets from the twitter dev site. Can you Help me Debug this?
The code is mostly based on http://www.androidhive.info/2012/09/android-twitter-oauth-connect-tutorial/
Thanks!
12-13 16:38:22.225: E/AndroidRuntime(12659): FATAL EXCEPTION: main
12-13 16:38:22.225: E/AndroidRuntime(12659): Process: code.laerstudios.gappa, PID: 12659
12-13 16:38:22.225: E/AndroidRuntime(12659): android.os.NetworkOnMainThreadException
12-13 16:38:22.225: E/AndroidRuntime(12659):at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1145)
12-13 16:38:22.225: E/AndroidRuntime(12659): at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
12-13 16:38:22.225: E/AndroidRuntime(12659): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
12-13 16:38:22.225: E/AndroidRuntime(12659): at java.net.InetAddress.getAllByName(InetAddress.java:214)
12-13 16:38:22.225: E/AndroidRuntime(12659): at com.android.okhttp.internal.Dns$1.getAllByName(Dns.java:28)
12-13 16:38:22.225: E/AndroidRuntime(12659): at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:216)
12-13 16:38:22.225: E/AndroidRuntime(12659): at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:122)
12-13 16:38:22.225: E/AndroidRuntime(12659): at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:292)
12-13 16:38:22.225: E/AndroidRuntime(12659): at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
12-13 16:38:22.225: E/AndroidRuntime(12659): at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
12-13 16:38:22.225: E/AndroidRuntime(12659): at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
12-13 16:38:22.225: E/AndroidRuntime(12659): at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:89)
12-13 16:38:22.225: E/AndroidRuntime(12659): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197)
12-13 16:38:22.225: E/AndroidRuntime(12659): at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:254)
12-13 16:38:22.225: E/AndroidRuntime(12659): at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:135)
12-13 16:38:22.225: E/AndroidRuntime(12659): at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:61)
12-13 16:38:22.225: E/AndroidRuntime(12659): at twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:98)
12-13 16:38:22.225: E/AndroidRuntime(12659): at twitter4j.auth.OAuthAuthorization.getOAuthRequestToken(OAuthAuthorization.java:122)
12-13 16:38:22.225: E/AndroidRuntime(12659): at twitter4j.auth.OAuthAuthorization.getOAuthRequestToken(OAuthAuthorization.java:104)
12-13 16:38:22.225: E/AndroidRuntime(12659): at twitter4j.TwitterBaseImpl.getOAuthRequestToken(TwitterBaseImpl.java:298)
12-13 16:38:22.225: E/AndroidRuntime(12659): at code.laerstudios.gappa.MainActivity.loginToTwitter(MainActivity.java:225)
12-13 16:38:22.225: E/AndroidRuntime(12659): at code.laerstudios.gappa.MainActivity.access$0(MainActivity.java:212)
12-13 16:38:22.225: E/AndroidRuntime(12659): at code.laerstudios.gappa.MainActivity$1.onClick(MainActivity.java:153)
12-13 16:38:22.225: E/AndroidRuntime(12659): at android.view.View.performClick(View.java:4438)
12-13 16:38:22.225: E/AndroidRuntime(12659): at android.view.View$PerformClick.run(View.java:18422)
12-13 16:38:22.225: E/AndroidRuntime(12659): at android.os.Handler.handleCallback(Handler.java:733)
12-13 16:38:22.225: E/AndroidRuntime(12659): at android.os.Handler.dispatchMessage(Handler.java:95)
12-13 16:38:22.225: E/AndroidRuntime(12659): at android.os.Looper.loop(Looper.java:136)
12-13 16:38:22.225: E/AndroidRuntime(12659): at android.app.ActivityThread.main(ActivityThread.java:5019)
12-13 16:38:22.225: E/AndroidRuntime(12659): at java.lang.reflect.Method.invoke(Native Method)
12-13 16:38:22.225: E/AndroidRuntime(12659): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
12-13 16:38:22.225: E/AndroidRuntime(12659): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
12-13 16:38:25.449: I/Process(12659): Sending signal. PID: 12659 SIG: 9
Teach a man to fish;
If you Google the exception you got, you'll notice that you can't run network operation on the main thread.
https://www.google.co.uk/search?q=NetworkOnMainThreadException&client=ubuntu&channel=cs&oq=NetworkOnMainThreadException&aqs=chrome.0.69i57j69i59&sourceid=chrome&ie=UTF-8
The exception at the top is very clear: android.os.NetworkOnMainThreadException
Android does not let you do network operations on your main thread. Try creating an AsyncTask and do you operations there asynchronously.
Its Simple You have some network related Code in your UI thread, So put that within a thread like
Thread thread = new Thread()
{
#Override
public void run() {
}
};
thread.start();
Any code related to Http request or socket or any such things that are network related which will block the UI execution will cause this exception
I have a problem with implementing ActionBarSherlock in my test application.
If the main Activity is a subclass of Activity everything works perfectly, but when I subclass SherlockActivity I get an exception:
12-13 11:33:02.630: E/AndroidRuntime(11345): FATAL EXCEPTION: main
12-13 11:33:02.630: E/AndroidRuntime(11345): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{pl.lsi.test.packages/pl.lsi.test.packages.MainActivity}: java.lang.ClassNotFoundException: pl.lsi.test.packages.MainActivity
12-13 11:33:02.630: E/AndroidRuntime(11345): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2024)
12-13 11:33:02.630: E/AndroidRuntime(11345): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
12-13 11:33:02.630: E/AndroidRuntime(11345): at android.app.ActivityThread.access$600(ActivityThread.java:140)
12-13 11:33:02.630: E/AndroidRuntime(11345): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
12-13 11:33:02.630: E/AndroidRuntime(11345): at android.os.Handler.dispatchMessage(Handler.java:99)
12-13 11:33:02.630: E/AndroidRuntime(11345): at android.os.Looper.loop(Looper.java:137)
12-13 11:33:02.630: E/AndroidRuntime(11345): at android.app.ActivityThread.main(ActivityThread.java:4898)
12-13 11:33:02.630: E/AndroidRuntime(11345): at java.lang.reflect.Method.invokeNative(Native Method)
12-13 11:33:02.630: E/AndroidRuntime(11345): at java.lang.reflect.Method.invoke(Method.java:511)
12-13 11:33:02.630: E/AndroidRuntime(11345): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
12-13 11:33:02.630: E/AndroidRuntime(11345): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
12-13 11:33:02.630: E/AndroidRuntime(11345): at dalvik.system.NativeStart.main(Native Method)
12-13 11:33:02.630: E/AndroidRuntime(11345): Caused by: java.lang.ClassNotFoundException: pl.lsi.test.packages.MainActivity
12-13 11:33:02.630: E/AndroidRuntime(11345): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
12-13 11:33:02.630: E/AndroidRuntime(11345): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
12-13 11:33:02.630: E/AndroidRuntime(11345): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
12-13 11:33:02.630: E/AndroidRuntime(11345): at android.app.Instrumentation.newActivity(Instrumentation.java:1057)
12-13 11:33:02.630: E/AndroidRuntime(11345): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2015)
12-13 11:33:02.630: E/AndroidRuntime(11345): ... 11 more
I also have a problem with applying SherlockTheme to the manifest (Sherlock styles is not visible).
Then in values folder you have to add styles in styles.xml file....
I think you are missing the some file to place there
I am developing an Android application for >= API 8.
For compatibility reasons, the application uses Actionbar Sherlock. Before API 11, the NumberPicker was an internal widget, but I need the NumberPicker, so I had to come up with another solution.
After some Googling, I stumbled upon this NumberPicker from Mike Novak. I implemented it but unfortunately, when I click on the preference that should bring up the dialog with the numberpicker, the application crashes.
It seems there is something wrong with the reference to the layout (logcat says com.example.widget.NumberPicker is used) file, but the source references to com.michaelnovakjr.numberpicker.R.layout.pref_number_picker as you can see here.
LogCat output:
12-13 13:59:27.516: W/dalvikvm(11642): threadid=1: thread exiting with uncaught exception (group=0x40dbe930)
12-13 13:59:27.555: E/AndroidRuntime(11642): FATAL EXCEPTION: main
12-13 13:59:27.555: E/AndroidRuntime(11642): android.view.InflateException: Binary XML file line #24: Error inflating class com.michaelnovakjr.numberpicker.NumberPicker
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.view.LayoutInflater.createView(LayoutInflater.java:613)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.preference.DialogPreference.onCreateDialogView(DialogPreference.java:343)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.preference.DialogPreference.showDialog(DialogPreference.java:287)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.preference.DialogPreference.onClick(DialogPreference.java:266)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.preference.Preference.performClick(Preference.java:949)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.preference.PreferenceScreen.onItemClick(PreferenceScreen.java:215)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.widget.AdapterView.performItemClick(AdapterView.java:298)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.widget.AbsListView.performItemClick(AbsListView.java:1100)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.widget.AbsListView$PerformClick.run(AbsListView.java:2749)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.widget.AbsListView$1.run(AbsListView.java:3423)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.os.Handler.handleCallback(Handler.java:725)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.os.Handler.dispatchMessage(Handler.java:92)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.os.Looper.loop(Looper.java:137)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.app.ActivityThread.main(ActivityThread.java:5039)
12-13 13:59:27.555: E/AndroidRuntime(11642): at java.lang.reflect.Method.invokeNative(Native Method)
12-13 13:59:27.555: E/AndroidRuntime(11642): at java.lang.reflect.Method.invoke(Method.java:511)
12-13 13:59:27.555: E/AndroidRuntime(11642): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
12-13 13:59:27.555: E/AndroidRuntime(11642): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
12-13 13:59:27.555: E/AndroidRuntime(11642): at dalvik.system.NativeStart.main(Native Method)
12-13 13:59:27.555: E/AndroidRuntime(11642): Caused by: java.lang.reflect.InvocationTargetException
12-13 13:59:27.555: E/AndroidRuntime(11642): at java.lang.reflect.Constructor.constructNative(Native Method)
12-13 13:59:27.555: E/AndroidRuntime(11642): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.view.LayoutInflater.createView(LayoutInflater.java:587)
12-13 13:59:27.555: E/AndroidRuntime(11642): ... 23 more
12-13 13:59:27.555: E/AndroidRuntime(11642): Caused by: android.view.InflateException: Binary XML file line #22: Error inflating class com.example.widget.NumberPickerButton
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:698)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.view.LayoutInflater.inflate(LayoutInflater.java:459)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
12-13 13:59:27.555: E/AndroidRuntime(11642): at com.michaelnovakjr.numberpicker.NumberPicker.<init>(NumberPicker.java:125)
12-13 13:59:27.555: E/AndroidRuntime(11642): at com.michaelnovakjr.numberpicker.NumberPicker.<init>(NumberPicker.java:117)
12-13 13:59:27.555: E/AndroidRuntime(11642): ... 26 more
12-13 13:59:27.555: E/AndroidRuntime(11642): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.widget.NumberPickerButton" on path: /data/app/nl.livecarb.android-1.apk
12-13 13:59:27.555: E/AndroidRuntime(11642): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
12-13 13:59:27.555: E/AndroidRuntime(11642): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
12-13 13:59:27.555: E/AndroidRuntime(11642): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.view.LayoutInflater.createView(LayoutInflater.java:552)
12-13 13:59:27.555: E/AndroidRuntime(11642): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
12-13 13:59:27.555: E/AndroidRuntime(11642): ... 31 more
res/xml/main_preferences.xml
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:picker="http://schemas.android.com/apk/res/nl.livecarb.android" >
<PreferenceCategory android:title="#string/pref_cat_title_medical" >
<com.michaelnovakjr.numberpicker.NumberPickerPreference
android:key="#string/pref_key_ratio"
android:summary="Bla"
android:title="#string/pref_title_ratio"
picker:defaultValue="1"
picker:endRange="31"
picker:startRange="1" />
</PreferenceCategory>
<PreferenceCategory android:title="#string/pref_cat_title_other" >
<Preference
android:key="#string/pref_key_disclaimer"
android:title="#string/pref_title_disclaimer" />
</PreferenceCategory>
</PreferenceScreen>
SettingsActivity.java
public class SettingsActivity extends PreferenceActivity implements OnPreferenceClickListener {
#SuppressWarnings("deprecation")
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if(android.os.Build.VERSION.SDK_INT >= 11) {
getFragmentManager().beginTransaction().replace(android.R.id.content, new SettingsFragment(), "settings").commit();
} else {
addPreferencesFromResource(R.xml.main);
}
}
class SettingsFragment extends PreferenceFragment {
private Preference preferences = null;
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.main);
preferences = findPreference(getResources().getString(R.string.pref_key_disclaimer));
preferences.setOnPreferenceClickListener(SettingsActivity.this);
}
}
}
The error
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.widget.NumberPickerButton" on path: /data/app/nl.livecarb.android-1.apk doesn't make any sense to me, since I never used com.example.widget.NumberPickerButton. Neither the NumberPicker lib does.
Things I did trying to solve this problem:
How to use NumberPicker from QuietlyCoding in preferences?
Double checked the library project is referenced correct
Cleaned the project (including all libs)
Any thoughts?
Are you working off the master branch of the project? Try searching your code for a reference to that example package. I just took a look in the library and I don't see any reference to it.
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.