java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.SearchView.a()' on a null object reference

Stack Overflow | Prafuldev V R | 5 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

    Unable to launch Activity in Release mode (with proguard-android-optimize configuration)

    Stack Overflow | 5 months ago | Prafuldev V R
    java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.SearchView.a()' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

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

      at pzy64.pocketmath.summary.SearchActivity.onCreateOptionsMenu()
    2. pzy64.pocketmath.summary
      SearchActivity.onCreateOptionsMenu
      1. pzy64.pocketmath.summary.SearchActivity.onCreateOptionsMenu(Unknown Source)
      1 frame
    3. Android Platform
      Activity.onCreatePanelMenu
      1. android.app.Activity.onCreatePanelMenu(Activity.java:2866)
      1 frame
    4. Android Support v4
      s.onCreatePanelMenu
      1. android.support.v4.app.s.onCreatePanelMenu(Unknown Source)
      1 frame
    5. Android v7
      n.onCreatePanelMenu
      1. android.support.v7.view.n.onCreatePanelMenu(Unknown Source)
      1 frame
    6. android.support.v7
      ai.onCreatePanelMenu
      1. android.support.v7.a.ai.onCreatePanelMenu(Unknown Source)
      1 frame
    7. Android v7
      n.onCreatePanelMenu
      1. android.support.v7.view.n.onCreatePanelMenu(Unknown Source)
      1 frame
    8. android.support.v7
      bk.run
      1. android.support.v7.a.bk.run(Unknown Source)
      1 frame
    9. Android Platform
      ActivityThread.main
      1. android.os.Handler.handleCallback(Handler.java:815)
      2. android.os.Handler.dispatchMessage(Handler.java:104)
      3. android.os.Looper.loop(Looper.java:194)
      4. android.app.ActivityThread.main(ActivityThread.java:5550)
      4 frames
    10. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    11. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:955)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:750)
      2 frames