当前位置: 代码迷 >> 综合 >> 隐藏actionBar, 报错 getActionBar.hide() 运行时java.lang.NullPointerException
  详细解决方案

隐藏actionBar, 报错 getActionBar.hide() 运行时java.lang.NullPointerException

热度:45   发布时间:2023-12-16 16:25:43.0


01-11 10:22:50.631 28150-28150/? E/AndroidRuntime:  Caused by: java.lang.NullPointerException
01-11 10:22:50.631 28150-28150/? E/AndroidRuntime:     at com.gps.yyq.gpsyyq.MainActivity.onCreate(MainActivity.java:20)
01-11 10:22:50.631 28150-28150/? E/AndroidRuntime:     at android.app.Activity.performCreate(Activity.java:5377)
01-11 10:22:50.631 28150-28150/? E/AndroidRuntime:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
01-11 10:22:50.631 28150-28150/? E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2270)
01-11 10:22:50.631 28150-28150/? E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2362) 
01-11 10:22:50.631 28150-28150/? E/AndroidRuntime:     at android.app.ActivityThread.access$700(ActivityThread.java:168) 
01-11 10:22:50.631 28150-28150/? E/AndroidRuntime:     at android.app.ActivityT
  相关解决方案