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 | 9 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Trouble setting up search view in android

    Stack Overflow | 9 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