该应用程序运行良好,但在某些设备上关闭,此应用程序代码
我的代码是:
public List<item> getListProduct() {
item product = null;
List<item> productList = new ArrayList<>();
openDatabase();
Cursor cursor = mDatabase.rawQuery("SELECT * FROM tablo", null);
cursor.moveToFirst();
while (!cursor.isAfterLast()) {
product = new item(cursor.getInt(0),
cursor.getString(1),
cursor.getString(2),
cursor.getString(3),
cursor.getString(4),
cursor.getString(5),
cursor.getInt(6));
productList.add(product);
cursor.moveToNext();
}
cursor.close();
closeDatabase();
return productList;
}
我得到这个错误
Caused by: android.database.sqlite.SQLiteException
任何帮手