java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.design.widget.TabLayout.setVisibility(int)' on a null object reference

GitHub | jahirfiquitiva | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Fix another crash in Icons preview section

    GitHub | 1 year ago | jahirfiquitiva
    java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.design.widget.TabLayout.setVisibility(int)' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'void android.support.design.widget.TabLayout.setVisibility(int)' on a null object reference

      at jahirfiquitiva.apps.iconshowcase.fragments.PreviewsFragment.onDestroyView()
    2. jahirfiquitiva.apps.iconshowcase
      PreviewsFragment.onDestroyView
      1. jahirfiquitiva.apps.iconshowcase.fragments.PreviewsFragment.onDestroyView(PreviewsFragment.java:139)
      1 frame
    3. Android Support v4
      FragmentActivity.onStart
      1. android.support.v4.app.Fragment.performDestroyView(Fragment.java:2167)
      2. android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1141)
      3. android.support.v4.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1345)
      4. android.support.v4.app.BackStackRecord.run(BackStackRecord.java:695)
      5. android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1613)
      6. android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:330)
      7. android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:547)
      7 frames
    4. Android Platform
      ActivityThread.main
      1. android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1220)
      2. android.app.Activity.performStart(Activity.java:5991)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2279)
      4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2376)
      5. android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3928)
      6. android.app.ActivityThread.access$900(ActivityThread.java:147)
      7. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1287)
      8. android.os.Handler.dispatchMessage(Handler.java:102)
      9. android.os.Looper.loop(Looper.java:135)
      10. android.app.ActivityThread.main(ActivityThread.java:5253)
      10 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Method.java)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:900)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:695)
      2 frames