简体   繁体   中英

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

I am getting this error when im 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();

                }

Change

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

to

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM