java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.drawable.Drawable.getPadding(android.graphics.Rect)' on a null object reference

csdn.net | 4 months ago
  1. 0

    Error in switch in android 5.0

    Stack Overflow | 2 years ago | Hardik Chauhan
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.drawable.Drawable.getPadding(android.graphics.Rect)' on a null object reference
  2. 0

    Error in switch in android 5.0 - zzm628的专栏 - 博客频道 - CSDN.NET

    csdn.net | 4 months ago
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.drawable.Drawable.getPadding(android.graphics.Rect)' on a null object reference
  3. 0

    Switch crashes when clicked on Android 5.0

    Stack Overflow | 2 years ago | William W
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.drawable.Drawable.getPadding(android.graphics.Rect)' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  1. Agócs Tamás 2 times, last 6 months ago
11 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    Attempt to invoke virtual method 'boolean android.graphics.drawable.Drawable.getPadding(android.graphics.Rect)' on a null object reference

    at android.widget.Switch.hitThumb()
  2. Android Platform
    ViewGroup.dispatchTouchEvent
    1. android.widget.Switch.hitThumb(Switch.java:694)
    2. android.widget.Switch.onTouchEvent(Switch.java:711)
    3. android.view.View.dispatchTouchEvent(View.java:8388)
    4. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430)
    5. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2119)
    6. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430)
    7. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2119)
    8. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430)
    9. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2119)
    10. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430)
    11. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2119)
    12. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430)
    13. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2119)
    14. android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430)
    15. android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2119)
    15 frames
  3. Android
    PhoneWindow.superDispatchTouchEvent
    1. com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2314)
    2. com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1692)
    2 frames
  4. Android Platform
    Activity.dispatchTouchEvent
    1. android.app.Activity.dispatchTouchEvent(Activity.java:2739)
    1 frame
  5. Android
    PhoneWindow$DecorView.dispatchTouchEvent
    1. com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2275)
    1 frame
  6. Android Platform
    ActivityThread.main
    1. android.view.View.dispatchPointerEvent(View.java:8578)
    2. android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4021)
    3. android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3887)
    4. android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3449)
    5. android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3502)
    6. android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3468)
    7. android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3578)
    8. android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3476)
    9. android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3635)
    10. android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3449)
    11. android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3502)
    12. android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3468)
    13. android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3476)
    14. android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3449)
    15. android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5701)
    16. android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5675)
    17. android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5646)
    18. android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5791)
    19. android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
    20. android.os.MessageQueue.nativePollOnce(Native Method)
    21. android.os.MessageQueue.next(MessageQueue.java:143)
    22. android.os.Looper.loop(Looper.java:122)
    23. android.app.ActivityThread.main(ActivityThread.java:5223)
    23 frames
  7. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:372)
    2 frames
  8. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
    2 frames