Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Ni Yao](https://secure.gravatar.com/avatar/4e980241bb9e141bb892bf03fcf7a10d?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ni Yao
3,852 PointsApp crashes when deleting
The version I downloaded must've been modified afterwards as it contained an extra line that crashes the app upon deleting. Took me a while to find it.
Toast.makeText(MemeItemFragment.this.getActivity(), "Should delete", Toast.LENGTH_LONG).show();
MemeDataSource dataSource = new MemeDataSource(MemeItemFragment.this.getActivity());
dataSource.delete(memeId);
refreshMemes();
/This line causes the crash, just remove it and it works like a charm/mMemeItemListAdapter.notifyDataSetChanged();
mMenu.findItem(R.id.share_action).setVisible(true);
mMenu.findItem(R.id.edit_action).setVisible(true);
Steven Parker
230,688 PointsSteven Parker
230,688 PointsAre you sure this was intended for the "Databases" topic? You can change the topic in the "Edit Question" area.
Also, please provide a link to the course page you are referring to.