开发者

throwing null pointer exception ,want to display content provider save item in list view using base adapter

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()];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜