NullPointer Exception While Doing Search Feature for ListView With BaseAdapter

前端 未结 3 1775
误落风尘
误落风尘 2021-01-27 20:32

I just finished adding a search feature to my android widget to search through a list of the users installed applications. My app installs fine and everything but when I go to s

3条回答
  •  走了就别回头了
    2021-01-27 20:55

    Seems that mListAppInfo is null in

    @Override
    public int getCount() {
        return mListAppInfo.size();
    }
    

    Which makes me suppose that for some reason your call to getInstalledApplications when you instantiate the adapter returns null.

提交回复
热议问题