当我试图通过从另一个类调用构造函数来获取表中的数据列表时,我收到此错误, 我的主要文件是
Account.java
try{
List<PersonalInformation> temp = helper.findAll();
Toast.makeText(getApplicationContext(), temp.size(), Toast.LENGTH_LONG).show();
}
catch (Exception e) {
Toast.makeText(getApplicationContext(), e+"", Toast.LENGTH_LONG).show();
}
答案 0 :(得分:10)
更改
Toast.makeText(getApplicationContext(), temp.size(), Toast.LENGTH_LONG).show();
到
Toast.makeText(getApplicationContext(), String.valueOf(temp.size()), Toast.LENGTH_LONG).show();