0

我的应用在纵向模式下运行良好。当我使用横向模式并执行任何活动时,它会强制关闭。日志说空指针异常。我与消息来源核实了所有信息都很好,但正在接近。

日志:

10-24 17:14:38.566: E/AndroidRuntime(3684): FATAL EXCEPTION: main
10-24 17:14:38.566: E/AndroidRuntime(3684): java.lang.RuntimeException: Unable to start activity ComponentInfo{/app.UserPage}: java.lang.NullPointerException
10-24 17:14:38.566: E/AndroidRuntime(3684):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2343)
10-24 17:14:38.566: E/AndroidRuntime(3684):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2395)
10-24 17:14:38.566: E/AndroidRuntime(3684):     at android.app.ActivityThread.access$600(ActivityThread.java:162)
10-24 17:14:38.566: E/AndroidRuntime(3684):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
10-24 17:14:38.566: E/AndroidRuntime(3684):     at android.os.Handler.dispatchMessage(Handler.java:107)
10-24 17:14:38.566: E/AndroidRuntime(3684):     at android.os.Looper.loop(Looper.java:194)
10-24 17:14:38.566: E/AndroidRuntime(3684):     at android.app.ActivityThread.main(ActivityThread.java:5371)
10-24 17:14:38.566: E/AndroidRuntime(3684):     at java.lang.reflect.Method.invokeNative(Native Method)
10-24 17:14:38.566: E/AndroidRuntime(3684):     at java.lang.reflect.Method.invoke(Method.java:525)
10-24 17:14:38.566: E/AndroidRuntime(3684):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
10-24 17:14:38.566: E/AndroidRuntime(3684):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
10-24 17:14:38.566: E/AndroidRuntime(3684):     at dalvik.system.NativeStart.main(Native Method)
10-24 17:14:38.566: E/AndroidRuntime(3684): Caused by: java.lang.NullPointerException
10-24 17:14:38.566: E/AndroidRuntime(3684):     at app.UserPage.onCreate(UserPage.java:219)
10-24 17:14:38.566: E/AndroidRuntime(3684):     at android.app.Activity.performCreate(Activity.java:5122)
10-24 17:14:38.566: E/AndroidRuntime(3684):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1081)
10-24 17:14:38.566: E/AndroidRuntime(3684):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2307)
10-24 17:14:38.566: E/AndroidRuntime(3684):     ... 11 more
4

0 回答 0