This is the stack trace I get. Any Ideas?

java.lang.RuntimeException:
Unable to destroy activity {com.testapp.views/
com.testapp.views.MainActivity}: java.lang.NullPointerException
        at
android.app.ActivityThread.performDestroyActivity(ActivityThread.java:
3948)
        at
android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:
4011)
        at
android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:
4127)
        at android.app.ActivityThread.access$2400(ActivityThread.java:136)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
2183)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:143)
        at android.app.ActivityThread.main(ActivityThread.java:5068)
        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:858)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
        at dalvik.system.NativeStart.main(Native Method)

Caused by: java.lang.NullPointerException
        at com.testapp.views.MainActivity.onDestroy(MainActivity.java:530)
        at
android.app.ActivityThread.performDestroyActivity(ActivityThread.java:
3935)
        ... 12 more


On Feb 22, 3:20 pm, Mark Murphy <[email protected]> wrote:
> None of those are errors. You will be looking for a Java stack trace.
>
>
>
>
>
>
>
>
>
> On Tue, Feb 22, 2011 at 9:03 AM, André <[email protected]> wrote:
> > 02-22 14:38:15.941: VERBOSE/upgrading(1430): onConfigurationChanged to
> > call verify locale
> > 02-22 14:38:15.951: INFO/upgrading(1430): verifyLocale status: 0
> > 02-22 14:38:15.951: INFO/upgrading(1430): verifyLocale providerLocale:
> > en_ES
> > 02-22 14:38:15.951: INFO/UsageStats(1297): Unexpected resume of
> > com.testapp.views while already resumed in com.testapp.views
> > 02-22 14:38:20.947: WARN/WindowManager(1297): App freeze timeout
> > expired.
> > 02-22 14:38:20.947: WARN/WindowManager(1297): Force clearing freeze:
> > AppWindowToken{47f54088 token=HistoryRecord{47a85750
> > com.testapp.views/.MainActivity}}
>
> > This is what I got from the logcat. I think it is here it crashes. Can
> > you read it? Because I don't understand much of it!
>
> > //André
>
> > On Feb 22, 2:26 pm, André <[email protected]> wrote:
> >> I have a problem with the two layouts. When I rotate the phone from
> >> portrait to landscape (and vice versa) in my main activity the
> >> application closes without the force close message. If I start my app
> >> in either landscape or portrait the layouts work, but if I just
> >> switched from either orientation it takes 3 - 5 tries before the
> >> program starts with the outcome that the program just shuts down in
> >> the 3 - 5 attempts.
>
> >> My main activity's layout file is called main.xml and I have this file
> >> in res/layout, res/layout-port & res/layout-land with some
> >> modifictaions in layout-land.
> >> I call setContentView(R.layout.main); from onCreate.
>
> >> Is there something vital I'm missing for this to work?
>
> >> //André
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.4 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to