java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getLeft()' on a null object reference

GitHub | shadowline | 7 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

    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getLeft()' on a null object reference

    GitHub | 7 months ago | shadowline
    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getLeft()' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'int android.view.View.getLeft()' on a null object reference

      at com.flyco.tablayout.CommonTabLayout.c()
    2. com.flyco.tablayout
      CommonTabLayout.setCurrentTab
      1. com.flyco.tablayout.CommonTabLayout.c(CommonTabLayout.java)
      2. com.flyco.tablayout.CommonTabLayout.setCurrentTab(CommonTabLayout.java)
      2 frames
    3. com.richinfo.drive
      MainActivity.onCreate
      1. com.richinfo.drive.activity.MainActivity.assignViews(MainActivity.java)
      2. com.richinfo.drive.activity.MainActivity.onCreate(MainActivity.java)
      2 frames
    4. Android Platform
      ActivityThread.main
      1. android.app.Activity.performCreate(Activity.java:6060)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1125)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2604)
      4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2715)
      5. android.app.ActivityThread.access$800(ActivityThread.java:178)
      6. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1579)
      7. android.os.Handler.dispatchMessage(Handler.java:111)
      8. android.os.Looper.loop(Looper.java:199)
      9. android.app.ActivityThread.main(ActivityThread.java:5783)
      9 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:982)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:777)
      2 frames