java.lang.RuntimeException: Unable to start activity ComponentInfo{com.wenming.weiswift/com.wenming.weiswift.ui.login.activity.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.scrollToPosition(int)' on a null object reference

GitHub | wenmingvs | 8 months 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

    【CrashLog】 WeiSwift 2016-08-16 11:01:14:21

    GitHub | 8 months ago | wenmingvs
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.wenming.weiswift/com.wenming.weiswift.ui.login.activity.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.scrollToPosition(int)' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.scrollToPosition(int)' on a null object reference

      at com.wenming.weiswift.ui.login.fragment.home.HomeFragment.scrollToTop()
    2. com.wenming.weiswift
      MainActivity.onCreate
      1. com.wenming.weiswift.ui.login.fragment.home.HomeFragment.scrollToTop(HomeFragment.java:178)
      2. com.wenming.weiswift.ui.login.activity.MainActivity.showHomeFragment(MainActivity.java:256)
      3. com.wenming.weiswift.ui.login.activity.MainActivity.switchToFragment(MainActivity.java:217)
      4. com.wenming.weiswift.ui.login.activity.MainActivity.restoreFragment(MainActivity.java:149)
      5. com.wenming.weiswift.ui.login.activity.MainActivity.onCreate(MainActivity.java:126)
      5 frames
    3. Android Platform
      ActivityThread.main
      1. android.app.Activity.performCreate(Activity.java:6876)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206)
      4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
      5. android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:5382)
      6. android.app.ActivityThread.access$1200(ActivityThread.java:221)
      7. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1800)
      8. android.os.Handler.dispatchMessage(Handler.java:102)
      9. android.os.Looper.loop(Looper.java:158)
      10. android.app.ActivityThread.main(ActivityThread.java:7224)
      10 frames
    4. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    5. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
      2 frames
    6. XposedBridge
      XposedBridge.main
      1. de.robv.android.xposed.XposedBridge.main(XposedBridge.java:134)
      1 frame