java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.view.ViewGroup.getContext()' on a null object reference

GitHub | saurabhjn76 | 3 months ago
  1. 0

    App Crash when internet is not available

    GitHub | 3 months ago | saurabhjn76
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.view.ViewGroup.getContext()' on a null object reference
  2. 0

    如果手机没装SD卡 是不是也会报错啊

    GitHub | 3 weeks ago | Greathfs
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.view.ViewGroup.getContext()' on a null object reference
  3. 0

    Android Snackbar NullPointerException in Fragment

    Stack Overflow | 2 years ago | Murat Erdogan
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.view.ViewGroup.getContext()' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Upvoted a post, received a crash!

    GitHub | 1 year ago | russjr08
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.view.ViewGroup.getContext()' on a null object reference
  6. 0

    GitHub comment 291#151607833

    GitHub | 1 year ago | l3d00m
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.view.ViewGroup.getContext()' on a null object reference
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 'android.content.Context android.view.ViewGroup.getContext()' on a null object reference

    at android.support.design.widget.Snackbar.<init>()
  2. android.support.design
    Snackbar.make
    1. android.support.design.widget.Snackbar.<init>(Snackbar.java:185)
    2. android.support.design.widget.Snackbar.make(Snackbar.java:217)
    2 frames
  3. musicgenie.com.musicgenie
    MainActivity$2.onSearchAction
    1. musicgenie.com.musicgenie.activity.MainActivity.makeSnake(MainActivity.java:540)
    2. musicgenie.com.musicgenie.activity.MainActivity.fireSearch(MainActivity.java:257)
    3. musicgenie.com.musicgenie.activity.MainActivity.access$000(MainActivity.java:51)
    4. musicgenie.com.musicgenie.activity.MainActivity$2.onSearchAction(MainActivity.java:194)
    4 frames
  4. com.arlib.floatingsearchview
    SearchInputView$1.onKey
    1. com.arlib.floatingsearchview.FloatingSearchView$9.onSearchKeyClicked(FloatingSearchView.java:635)
    2. com.arlib.floatingsearchview.util.view.SearchInputView$1.onKey(SearchInputView.java:19)
    2 frames
  5. Android Platform
    ViewGroup.dispatchKeyEvent
    1. android.view.View.dispatchKeyEvent(View.java:9323)
    2. android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
    3. android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
    4. android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
    5. android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
    6. android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
    7. android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
    8. android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
    9. android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
    10. android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
    11. android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
    12. android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
    13. android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
    14. android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
    14 frames
  6. Android
    PhoneWindow.superDispatchKeyEvent
    1. com.android.internal.policy.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:2494)
    2. com.android.internal.policy.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1783)
    2 frames
  7. Android Platform
    Activity.dispatchKeyEvent
    1. android.app.Activity.dispatchKeyEvent(Activity.java:2779)
    1 frame
  8. Android v7
    AppCompatDelegateImplBase$AppCompatWindowCallbackBase.dispatchKeyEvent
    1. android.support.v7.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:533)
    2. android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:53)
    3. android.support.v7.app.AppCompatDelegateImplBase$AppCompatWindowCallbackBase.dispatchKeyEvent(AppCompatDelegateImplBase.java:254)
    3 frames
  9. Android
    PhoneWindow$DecorView.dispatchKeyEvent
    1. com.android.internal.policy.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:2402)
    1 frame
  10. Android Platform
    ActivityThread.main
    1. android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:4659)
    2. android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4615)
    3. android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4110)
    4. android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4163)
    5. android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4129)
    6. android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4293)
    7. android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4137)
    8. android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4350)
    9. android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4110)
    10. android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4163)
    11. android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4129)
    12. android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4137)
    13. android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4110)
    14. android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6593)
    15. android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6567)
    16. android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6499)
    17. android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3890)
    18. android.os.Handler.dispatchMessage(Handler.java:111)
    19. android.os.Looper.loop(Looper.java:207)
    20. android.app.ActivityThread.main(ActivityThread.java:5769)
    20 frames
  11. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    1 frame