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
You haven't created an instance of an ArrayAdapter for your itemsAdapter variable when you try to call the add() method on it.
Try to initialise it using:
itemsAdapter = new ArrayAdapter(this,
android.R.layout.simple_list_item_1, values);
Note: values is either a String[] or List so you'll need to pass that in correctly