[Solved] My object is not null but I’m getting a NULL POINTER EXCEPTION


In the stacktrace I see this:

java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference

The adapter is trying to call size() on a null List. Make sure your list searchResults is not null.

solved My object is not null but I’m getting a NULL POINTER EXCEPTION