Rajesh Panchal
Rajesh Panchal

Reputation: 1170

android.content.res.resources$notfoundexception string resource id #0x0

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

                }

Upvotes: 2

Views: 5980

Answers (1)

Egor
Egor

Reputation: 40193

Change

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

to

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

Upvotes: 10

Related Questions