1

java.lang.NullPointerException on selecting action-bar item

view story
linux-howto

http://stackoverflow.com – @Override public void onTabReselected(Tab tab, FragmentTransaction ft) { Toast.makeText(MainActivity.appContext, "Reselected!", Toast.LENGTH_LONG).show(); } My application closes and throws a Null Pointer Exception when i re-select the actionbar again. The error seems to be happening inside the above method. LogCat: > 03-19 20:26:54.075: E/AndroidRuntime(2506): FATAL EXCEPTION: main > 03-19 20:26:54.075: E/AndroidRuntime(2506): > java.lang.NullPointerException 03-19 20:26:54.075: > E/AndroidRuntime(2506): at android.widget.Toast.<init>(Toast.java:85) > 03-19 20 (HowTos)