dear i save the data in content provider and fetch using cursor object and want to display in list view using base adapt开发者_JAVA百科er but it is throwing "NULL POINTER EXCEPTION " i dont understood ehy bcoz i am showing value in log cat it display and after i store these values in array using for loop ,please take a look in my code, and debug pls where i m wrong.
static String id = null;
static String userName = null;
static String[] usr;
@Override
}
You never initialized the array usr
, so it's still null. Consider adding before the loop:
usr = new String[id.length()];
精彩评论