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

Android Build an Interactive Story App User Input Introducing ImageViews

Christopher Herring
Christopher Herring
1,432 Points

Why are my images missing when I use imageView?

I am on the Android interactive story course. I downloaded some images from Treehouse, as instructed in the video, and I moved them into the res folder, also as instructed by Treehouse. Although, when I use imageView from the Palette of Android Studio, most if not, all of my images are missing. Does anybody know why?

2 Answers

Cam Richardson
seal-mask
MOD
.a{fill-rule:evenodd;}techdegree
Cam Richardson
Front End Web Development Treehouse Moderator 16,895 Points

I've had this issue as well. Whenever I go to choose an image source for a view the project images that I added will be missing. The resolution is to choose Build > Clean Project then Build > Rebuild Project or to re-sync your project with Gradle or to choose File > Invalidate caches/Restart. Afterwards when I go and try to pick an image my project resources will then show up.

Mike Swartz
Mike Swartz
566 Points

I'm having the same issue. I can see the png's are inside the drawable folder in the sidebar, so it looks like they were loaded into the res/drawable/ folder(s) just fine. But when I add the image view and try to choose one of the drawables, none of them are listed in any of the folders. It does show the mipmaps however, which is weird. Feel like I can't continue the tutorial until I figure this out.

Mike Swartz
Mike Swartz
566 Points

Update: Cleaning then building failed, but Cam's tip to Invalidate & Restart worked! Back on track. Thanks Cam.