java.lang.NullPointerException: Attempt to invoke virtual method 'android.widget.Filter com.github.brnmb.amounty.adapter.AmountyAdapter.getFilter()' on a null object reference

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by brnmb
, 1 year ago
Attempt to invoke virtual method 'android.widget.Filter com.github.brnmb.amounty.adapter.AmountyAdapter.getFilter()' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'android.widget.Filter com.github.brnmb.amounty.adapter.AmountyAdapter.getFilter()' on a null object reference
at com.github.brnmb.amounty.view.MainFragment.filter(MainFragment.java:144)
at com.github.brnmb.amounty.view.MainActivity$1.onQueryTextChange(MainActivity.java:101)
at android.support.v7.widget.SearchView.onTextChanged(SearchView.java:1150)
at android.support.v7.widget.SearchView.access$2000(SearchView.java:103)
at android.widget.TextView.sendOnTextChanged(TextView.java:8976)
at android.widget.TextView.handleTextChanged(TextView.java:9073)
at android.widget.TextView$ChangeWatcher.onTextChanged(TextView.java:11577)
at android.text.SpannableStringBuilder.sendTextChanged(SpannableStringBuilder.java:968)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:519)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:456)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:33)
at android.view.inputmethod.BaseInputConnection.replaceText(BaseInputConnection.java:691)
at com.android.internal.widget.EditableInputConnection.commitText(EditableInputConnection.java:184)
at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:286)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5951)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.