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

Stack Overflow | Tom Finet | 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

    Trouble setting up search view in android

    Stack Overflow | 7 months ago | Tom Finet
    java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.SearchView.setSearchableInfo(android.app.SearchableInfo)' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

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

      at com.hb.birthpay.activity.FindFriendActivity.onCreateOptionsMenu()
    2. com.hb.birthpay
      FindFriendActivity.onCreateOptionsMenu
      1. com.hb.birthpay.activity.FindFriendActivity.onCreateOptionsMenu(FindFriendActivity.java:75)
      1 frame