IllegalStateException after coming back to a FragmentActivity - android

this is about a recurrent problem that I discovered my application is facing and is related to the use of a couple of DialogFragments. I'm targeting mainly platform level 8 devices so to use DialogFragments I had to use the compatibility library.
The problem itself happens whenever I get out of the application and them come back. Here's the stacktrace:
12-22 14:56:05.819: W/dalvikvm(6384): threadid=1: thread exiting with uncaught exception (group=0x400207d8)
12-22 14:56:05.949: E/AndroidRuntime(6384): FATAL EXCEPTION: main
12-22 14:56:05.949: E/AndroidRuntime(6384): java.lang.IllegalStateException: Activity has been destroyed
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1269)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:541)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.support.v4.app.BackStackRecord.commitAllowingStateLoss(BackStackRecord.java:529)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:102)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.support.v4.view.ViewPager.populate(ViewPager.java:692)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:851)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.view.View.measure(View.java:8171)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.widget.LinearLayout.measureVertical(LinearLayout.java:526)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.view.View.measure(View.java:8171)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.view.View.measure(View.java:8171)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.widget.LinearLayout.measureVertical(LinearLayout.java:526)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.view.View.measure(View.java:8171)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.view.View.measure(View.java:8171)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.view.ViewRoot.performTraversals(ViewRoot.java:801)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.os.Handler.dispatchMessage(Handler.java:99)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.os.Looper.loop(Looper.java:123)
12-22 14:56:05.949: E/AndroidRuntime(6384): at android.app.ActivityThread.main(ActivityThread.java:4627)
12-22 14:56:05.949: E/AndroidRuntime(6384): at java.lang.reflect.Method.invokeNative(Native Method)
12-22 14:56:05.949: E/AndroidRuntime(6384): at java.lang.reflect.Method.invoke(Method.java:521)
12-22 14:56:05.949: E/AndroidRuntime(6384): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
12-22 14:56:05.949: E/AndroidRuntime(6384): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
12-22 14:56:05.949: E/AndroidRuntime(6384): at dalvik.system.NativeStart.main(Native Method)
And here's my stripped-down-to-the-minimum MainActivity.
public class MainActivity extends FragmentActivity{
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
...
public void showNewChannelFragmentDialog() {
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
Fragment prev = getSupportFragmentManager().findFragmentByTag("dialog");
if (prev != null) {
ft.remove(prev);
}
ft.addToBackStack(null);
// Create and show the dialog.
NewChannelDialogFragment newFragment = NewChannelDialogFragment.newInstance();
newFragment.setContext(this);
newFragment.show(ft,"dialog");
}
}
The showNewChannelFragmentDialog() method is only called when the user selects a specific menu option, so I think the content of the DialogFragment itself is irrelevant here.
But you can see I do exactly what is shown here and it indeed works, the problem as I said earlier is whenever my application is being restored back to life once the user has left it.
Any suggestions? I'm considering dropping the fragments and just using regular Dialogs.

maybe it's not the one and only problem but you should call
ft.add(newFragment);
ft.commit(); //but at least this
at the end of your showNewChannelFragmentDialog() function.

Related

Integrated Crashlytics Kit failed with Android project

First of all, using Eclipse. It creates 4 projects(as libraries) after plugin installed and creates kit-libs with those 4 projects in my android-project. Then I built the project and the apk compiled successfully but ran failed. Failed log:
12-22 17:50:07.377: E/dalvikvm(8452): Could not find class 'io.fabric.sdk.android.Kit[]', referenced from method com.pplive.test.fabric.MainActivity.onCreate
12-22 17:50:07.377: W/dalvikvm(8452): VFY: unable to resolve new-array 650 ([Lio/fabric/sdk/android/Kit;) in Lcom/pplive/test/fabric/MainActivity;
12-22 17:50:07.377: D/dalvikvm(8452): VFY: replacing opcode 0x23 at 0x0004
12-22 17:50:07.377: D/dalvikvm(8452): DexOpt: unable to opt direct call 0x0ff0 at 0x09 in Lcom/pplive/test/fabric/MainActivity;.onCreate
12-22 17:50:07.383: D/AndroidRuntime(8452): Shutting down VM
12-22 17:50:07.383: W/dalvikvm(8452): threadid=1: thread exiting with uncaught exception (group=0x41be8930)
12-22 17:50:07.386: E/AndroidRuntime(8452): FATAL EXCEPTION: main
12-22 17:50:07.386: E/AndroidRuntime(8452): java.lang.NoClassDefFoundError: io.fabric.sdk.android.Kit[]
12-22 17:50:07.386: E/AndroidRuntime(8452): at com.pplive.test.fabric.MainActivity.onCreate(MainActivity.java:15)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.app.Activity.performCreate(Activity.java:5206)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
12-22 17:50:07.386: E/AndroidRuntime(8452): at com.lbe.security.service.core.client.internal.InstrumentationDelegate.callActivityOnCreate(InstrumentationDelegate.java:76)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2171)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.app.ActivityThread.access$600(ActivityThread.java:142)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1235)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.os.Handler.dispatchMessage(Handler.java:99)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.os.Looper.loop(Looper.java:137)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.app.ActivityThread.main(ActivityThread.java:5072)
12-22 17:50:07.386: E/AndroidRuntime(8452): at java.lang.reflect.Method.invokeNative(Native Method)
12-22 17:50:07.386: E/AndroidRuntime(8452): at java.lang.reflect.Method.invoke(Method.java:511)
12-22 17:50:07.386: E/AndroidRuntime(8452): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:812)
12-22 17:50:07.386: E/AndroidRuntime(8452): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:579)
12-22 17:50:07.386: E/AndroidRuntime(8452): at dalvik.system.NativeStart.main(Native Method)
Do I need to modify the build path in property?
I found same issue couple of days ago, Yesterday I have resolved this issue by:
By compile my project using 1.7. As crashlytics compiled in 1.7
Installing build-tool 20 from sdk manager.
Hopes it worked for you too.

android Could not lock surface : dequeueBuffer failed (Unknown error 2147483646)

I am getting this error while navigating through my app.It happens every 5-10 transitions and restarts the app.
here is the exception i got while app crashes.
Please help me to solve the issue.
12-22 16:33:41.625: E/Surface(23199): dequeueBuffer failed (Unknown error 2147483646)
12-22 16:33:41.633: E/ViewRootImpl(23199): Could not lock surface
12-22 16:33:41.633: E/ViewRootImpl(23199): java.lang.IllegalArgumentException
12-22 16:33:41.633: E/ViewRootImpl(23199): at android.view.Surface.nativeLockCanvas(Native Method)
12-22 16:33:41.633: E/ViewRootImpl(23199): at android.view.Surface.lockCanvas(Surface.java:243)
12-22 16:33:41.633: E/ViewRootImpl(23199): at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2461)
12-22 16:33:41.633: E/ViewRootImpl(23199): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2435)
12-22 16:33:41.633: E/ViewRootImpl(23199): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2279)
12-22 16:33:41.633: E/ViewRootImpl(23199): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1909)
12-22 16:33:41.633: E/ViewRootImpl(23199): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1019)
12-22 16:33:41.633: E/ViewRootImpl(23199): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5725)
12-22 16:33:41.633: E/ViewRootImpl(23199): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
12-22 16:33:41.633: E/ViewRootImpl(23199): at android.view.Choreographer.doCallbacks(Choreographer.java:574)
12-22 16:33:41.633: E/ViewRootImpl(23199): at android.view.Choreographer.doFrame(Choreographer.java:544)
12-22 16:33:41.633: E/ViewRootImpl(23199): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
12-22 16:33:41.633: E/ViewRootImpl(23199): at android.os.Handler.handleCallback(Handler.java:733)
12-22 16:33:41.633: E/ViewRootImpl(23199): at android.os.Handler.dispatchMessage(Handler.java:95)
12-22 16:33:41.633: E/ViewRootImpl(23199): at android.os.Looper.loop(Looper.java:136)
12-22 16:33:41.633: E/ViewRootImpl(23199): at android.app.ActivityThread.main(ActivityThread.java:5086)
12-22 16:33:41.633: E/ViewRootImpl(23199): at java.lang.reflect.Method.invokeNative(Native Method)
12-22 16:33:41.633: E/ViewRootImpl(23199): at java.lang.reflect.Method.invoke(Method.java:515)
12-22 16:33:41.633: E/ViewRootImpl(23199): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
12-22 16:33:41.633: E/ViewRootImpl(23199): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
12-22 16:33:41.633: E/ViewRootImpl(23199): at dalvik.system.NativeStart.main(Native Method)
I googled it and came to some of the solutions but they are all about webview.I didn't used webview or SurfaceView in my app.
I have also tried "android:hardwareAccelerated="false" in manifest file but issue still persist.
It was Picasso causing this issue.I was allocating a new object of picasso.Using a Singleton Object of picasso solves the issue.

java.lang.IllegalStateException: this should only be called when the cursor is valid

I am working with fragment in android 2.1 for this I am using supportV4 jar. I have two fragment in one activity one for new data insert and other for display list ,I am using ResourceCursorAdapter in fragment to display all data from cursor but when I move from this activity to another activity I am getting force close it generates error like this
07-23 18:26:13.028: E/AndroidRuntime(25309): java.lang.IllegalStateException: this should only be called when the cursor is valid
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.support.v4.widget.CursorAdapter.getView(CursorAdapter.java:245)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.widget.AbsListView.obtainView(AbsListView.java:1315)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.widget.ListView.measureHeightOfChildren(ListView.java:1198)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.widget.ListView.onMeasure(ListView.java:1109)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.view.View.measure(View.java:8171)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1012)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.widget.LinearLayout.measureVertical(LinearLayout.java:381)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.view.View.measure(View.java:8171)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.view.View.measure(View.java:8171)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1029)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.view.View.measure(View.java:8171)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.widget.LinearLayout.measureVertical(LinearLayout.java:526)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.view.View.measure(View.java:8171)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.view.View.measure(View.java:8171)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.widget.LinearLayout.measureVertical(LinearLayout.java:526)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.view.View.measure(View.java:8171)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.view.View.measure(View.java:8171)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.view.View.measure(View.java:8171)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.view.ViewRoot.performTraversals(ViewRoot.java:801)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.os.Handler.dispatchMessage(Handler.java:99)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.os.Looper.loop(Looper.java:123)
07-23 18:26:13.028: E/AndroidRuntime(25309): at android.app.ActivityThread.main(ActivityThread.java:4627)
07-23 18:26:13.028: E/AndroidRuntime(25309): at java.lang.reflect.Method.invokeNative(Native Method)
07-23 18:26:13.028: E/AndroidRuntime(25309): at java.lang.reflect.Method.invoke(Method.java:521)
07-23 18:26:13.028: E/AndroidRuntime(25309): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-23 18:26:13.028: E/AndroidRuntime(25309): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-23 18:26:13.028: E/AndroidRuntime(25309): at dalvik.system.NativeStart.main(Native Method)
Make sure that you are including the _ID column in your projection. It's required for the cursor adapter to work.

ListPreference is throwing a strange null pointer exception

I have an app that obtains a list of available Calendars and displays
them in the Spinner.
I have checks to ensure that if the available Calendar list is empty,
then ListPreference will still display "None available" in the Spinner.
I am using the ListPreference to display the Spinner in the
Preferences tab.
Here is the preferences.xml:
<ListPreference android:title="Calendar"
android:key="calendars"
android:summary="Calendars to use for saving Appts"
android:selectable="true"
android:entryValues="#array/cal_entryvalues_list_preference"
android:entries="#array/cal_entries_list_preference"
android:defaultValue="0"
android:enabled="true"></ListPreference>
My users have reported the following error:
java.lang.NullPointerException
at
android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:
355)
at android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
at android.widget.AbsListView.obtainView(AbsListView.java:1294)
at android.widget.ListView.measureHeightOfChildren(ListView.java:1198)
at android.widget.ListView.onMeasure(ListView.java:1109)
at android.view.View.measure(View.java:8171)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
at
android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:
1012)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:381)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
at android.view.View.measure(View.java:8171)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
at
android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:
1012)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:381)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
at
com.android.internal.widget.WeightedLinearLayout.onMeasure(WeightedLinearLayout.java:
60)
at android.view.View.measure(View.java:8171)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
at android.view.View.measure(View.java:8171)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
at android.view.View.measure(View.java:8171)
at android.view.ViewRoot.performTraversals(ViewRoot.java:801)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
The stack trace seems to be pointed all internal workings of Android.
There is no reference to any of my code. This is happening on
Android 2.1 as well as Android 2.2 platforms.
Unfortunately, I have not been able to reproduce the error on my Moto
Droid. It appears from Developer Console logs that this is specific to
certain phones (e.g: HTC Incredible).
Any idea what is going on here?

Is there anyone of troubleshooting or dealing with stack overflow errors when the trace shows nothing?

Got a trace like this:
java.lang.StackOverflowError
at android.widget.TextView.onMeasure(TextView.java:5160)
at android.view.View.measure(View.java:8172)
at android.widget.TableRow.getColumnsWidths(TableRow.java:308)
at android.widget.TableLayout.findLargestCells(TableLayout.java:497)
at android.widget.TableLayout.measureVertical(TableLayout.java:462)
at android.widget.TableLayout.onMeasure(TableLayout.java:428)
at android.view.View.measure(View.java:8172)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3140)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1012)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:381)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
at android.view.View.measure(View.java:8172)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3140)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1012)
at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:696)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:306)
at android.view.View.measure(View.java:8172)
at android.widget.ListView.measureScrapChild(ListView.java:1135)
at android.widget.ListView.measureHeightOfChildren(ListView.java:1200)
at android.widget.ListView.onMeasure(ListView.java:1109)
at android.view.View.measure(View.java:8172)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3140)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1012)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:381)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
at android.view.View.measure(View.java:8172)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3140)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
at android.view.View.measure(View.java:8172)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:526)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
at android.view.View.measure(View.java:8172)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3140)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
at android.view.View.measure(View.java:8172)
at android.view.ViewRoot.performTraversals(ViewRoot.java:805)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1744)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:144)
at android.app.ActivityThread.main(ActivityThread.java:4937)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Is there anything that can be done here?
I'm getting reports of blank screens and force closes.
When stack traces don't help the best thing you can do is trace it.
Start to scatter log messages through strategic parts of your application, and once you find where it is set some breakpoints and step through.
Log.d("MyActivity", "MyClass.getView() — Initializing ");
Once you have your logs setup use LogCat

Categories

Resources