時差
2017-04-10 23:16
Caused by: NullPointerException: android.database.Cursor.moveToNext()' on a null object reference
while (cursor.moveToNext()) {
String id = cursor.getString(cursor.getColumnIndex(Constant._ID));
Commodity commodity = new Commodity(id);
list.add(commodity);
}
空指针,cursor没初始化(cursor = ?)
Android基础教程-SQLite高级操作
13982 学习 · 18 问题
相似问题
回答 1