2

I am getting this error when i m trying to get list of data from table by calling constructor from another class, my main file is

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

                }
4

1 回答 1

10

改变

Toast.makeText(getApplicationContext(), temp.size(), Toast.LENGTH_LONG).show();

Toast.makeText(getApplicationContext(), String.valueOf(temp.size()), Toast.LENGTH_LONG).show();
于 2013-04-25T10:18:18.477 回答