sinat_27741149
sinat_27741149
2015-04-27 01:54

新人求助 java.lang.NullPointerException

  • ndroid

04-26 21:42:40.039: E/AndroidRuntime(1125): FATAL EXCEPTION: main
04-26 21:42:40.039: E/AndroidRuntime(1125): Process: com.example.remotecontrol, PID: 1125
04-26 21:42:40.039: E/AndroidRuntime(1125): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.remotecontrol/com.example.remotecontrol.RemoteControlActivity}: java.lang.NullPointerException
04-26 21:42:40.039: E/AndroidRuntime(1125): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2176)
04-26 21:42:40.039: E/AndroidRuntime(1125): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
04-26 21:42:40.039: E/AndroidRuntime(1125): at android.app.ActivityThread.access$700(ActivityThread.java:135)
04-26 21:42:40.039: E/AndroidRuntime(1125): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
04-26 21:42:40.039: E/AndroidRuntime(1125): at android.os.Handler.dispatchMessage(Handler.java:102)
04-26 21:42:40.039: E/AndroidRuntime(1125): at android.os.Looper.loop(Looper.java:137)
04-26 21:42:40.039: E/AndroidRuntime(1125): at android.app.ActivityThread.main(ActivityThread.java:4998)
04-26 21:42:40.039: E/AndroidRuntime(1125): at java.lang.reflect.Method.invokeNative(Native Method)
04-26 21:42:40.039: E/AndroidRuntime(1125): at java.lang.reflect.Method.invoke(Method.java:515)
04-26 21:42:40.039: E/AndroidRuntime(1125): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
04-26 21:42:40.039: E/AndroidRuntime(1125): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
04-26 21:42:40.039: E/AndroidRuntime(1125): at dalvik.system.NativeStart.main(Native Method)
04-26 21:42:40.039: E/AndroidRuntime(1125): Caused by: java.lang.NullPointerException
04-26 21:42:40.039: E/AndroidRuntime(1125): at com.example.remotecontrol.RemoteControlFragment.onCreateView(RemoteControlFragment.java:43)
04-26 21:42:40.039: E/AndroidRuntime(1125): at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
04-26 21:42:40.039: E/AndroidRuntime(1125): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927)
04-26 21:42:40.039: E/AndroidRuntime(1125): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
04-26 21:42:40.039: E/AndroidRuntime(1125): at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
04-26 21:42:40.039: E/AndroidRuntime(1125): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467)
04-26 21:42:40.039: E/AndroidRuntime(1125): at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:570)
04-26 21:42:40.039: E/AndroidRuntime(1125): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1171)
04-26 21:42:40.039: E/AndroidRuntime(1125): at android.app.Activity.performStart(Activity.java:5253)
04-26 21:42:40.039: E/AndroidRuntime(1125): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2149)
04-26 21:42:40.039: E/AndroidRuntime(1125): ... 11 more

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

7条回答