How can i fix my null pointer exception

后端 未结 5 1219
生来不讨喜
生来不讨喜 2021-01-24 15:58

I\'ve been trying to fix this null pointer exception but I cant. I know its pointing to a null object but I don\'t how to fix it. I am beginner in Java programming so please don

5条回答
  •  失恋的感觉
    2021-01-24 16:17

    I think you should try this..!

    ArrayList myList = new ArrayList();
       ArrayAdapter adapter = new ArrayAdapter(this, R.layout.row,
        to, myList.);
    listView.setAdapter(adapter);
    

提交回复
热议问题