Sounds like you probably named a widget differently in the landscape, so 
your findViewById is returning null.

On Monday, July 30, 2012 1:48:00 PM UTC-5, Ehsan Sadeghi wrote:
>
> I have layout and layout-land in my app and in both have a file is named 
> realstate.xml, in portrait everything is ok, but in landscape application 
> stops by following error :
> 07-30 18:29:51.186: D/gralloc_goldfish(659): Emulator without GPU 
> emulation detected.
> 07-30 18:29:53.757: D/InputEventConsistencyVerifier(659): KeyEvent: 
> ACTION_UP but key was not down.
> 07-30 18:29:53.757: D/InputEventConsistencyVerifier(659):   in 
> android.view.ViewRootImpl@4121ca30
> 07-30 18:29:53.757: D/InputEventConsistencyVerifier(659):   0: sent at 
> 138005000000, KeyEvent { action=ACTION_UP, keyCode=KEYCODE_DPAD_CENTER, 
> scanCode=232, metaState=0, flags=0x8, repeatCount=0, eventTime=138005, 
> downTime=137916, deviceId=0, source=0x301 }
> 07-30 18:30:11.055: D/dalvikvm(659): GC_CONCURRENT freed 163K, 4% free 
> 8251K/8519K, paused 46ms+5ms, total 280ms
> 07-30 18:30:12.105: I/Choreographer(659): Skipped 48 frames!  The 
> application may be doing too much work on its main thread.
> 07-30 18:30:16.055: I/Choreographer(659): Skipped 44 frames!  The 
> application may be doing too much work on its main thread.
> 07-30 18:30:36.579: I/Choreographer(659): Skipped 41 frames!  The 
> application may be doing too much work on its main thread.
> 07-30 18:30:42.605: I/Choreographer(659): Skipped 30 frames!  The 
> application may be doing too much work on its main thread.
> 07-30 18:30:55.867: I/Choreographer(659): Skipped 39 frames!  The 
> application may be doing too much work on its main thread.
> 07-30 18:31:15.974: I/Choreographer(659): Skipped 41 frames!  The 
> application may be doing too much work on its main thread.
> 07-30 18:31:20.456: I/Choreographer(659): Skipped 51 frames!  The 
> application may be doing too much work on its main thread.
> 07-30 18:32:11.687: D/AndroidRuntime(659): Shutting down VM
> 07-30 18:32:11.687: W/dalvikvm(659): threadid=1: thread exiting with 
> uncaught exception (group=0x40a13300)
> 07-30 18:32:11.716: E/AndroidRuntime(659): FATAL EXCEPTION: main
> 07-30 18:32:11.716: E/AndroidRuntime(659): java.lang.RuntimeException: 
> Unable to start activity 
> ComponentInfo{ir.smspeik.sms/ir.smspeik.sms.Realstate}: 
> java.lang.NullPointerException
> 07-30 18:32:11.716: E/AndroidRuntime(659):  at 
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
> 07-30 18:32:11.716: E/AndroidRuntime(659):  at 
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
> 07-30 18:32:11.716: E/AndroidRuntime(659):  at 
> android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3512)
> 07-30 18:32:11.716: E/AndroidRuntime(659):  at 
> android.app.ActivityThread.access$700(ActivityThread.java:130)
> 07-30 18:32:11.716: E/AndroidRuntime(659):  at 
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1201)
> 07-30 18:32:11.716: E/AndroidRuntime(659):  at 
> android.os.Handler.dispatchMessage(Handler.java:99)
> 07-30 18:32:11.716: E/AndroidRuntime(659):  at 
> android.os.Looper.loop(Looper.java:137)
> 07-30 18:32:11.716: E/AndroidRuntime(659):  at 
> android.app.ActivityThread.main(ActivityThread.java:4745)
> 07-30 18:32:11.716: E/AndroidRuntime(659):  at 
> java.lang.reflect.Method.invokeNative(Native Method)
> 07-30 18:32:11.716: E/AndroidRuntime(659):  at 
> java.lang.reflect.Method.invoke(Method.java:511)
> 07-30 18:32:11.716: E/AndroidRuntime(659):  at 
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
> 07-30 18:32:11.716: E/AndroidRuntime(659):  at 
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
> 07-30 18:32:11.716: E/AndroidRuntime(659):  at 
> dalvik.system.NativeStart.main(Native Method)
> 07-30 18:32:11.716: E/AndroidRuntime(659): Caused by: 
> java.lang.NullPointerException
> 07-30 18:32:11.716: E/AndroidRuntime(659):  at 
> ir.smspeik.sms.Realstate.onCreate(Realstate.java:24)
> 07-30 18:32:11.716: E/AndroidRuntime(659):  at 
> android.app.Activity.performCreate(Activity.java:5008)
> 07-30 18:32:11.716: E/AndroidRuntime(659):  at 
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
> 07-30 18:32:11.716: E/AndroidRuntime(659):  at 
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
> 07-30 18:32:11.716: E/AndroidRuntime(659):  ... 12 more
> 07-30 18:32:16.056: D/gralloc_goldfish(688): Emulator without GPU 
> emulation detected.
>

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

Reply via email to