Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android Build an Interactive Story App (Retired) User Input Introducing ImageViews

gregory stocker
gregory stocker
3,520 Points

Build an Interactive Story App - I can`t access the drawables that I have downloaded using src from properties?

I downloaded the mars_drawables files from the teachers notes, then I put them in the drawable section by right clicking on drawable > Show in Explorer (on windows), then copy pasted the files into the drawable folder. When I click the drawable folder under the project tree, it shows that the images in all of the resolutions are all there. However, when trying to access these through imageView > properties > src > Project > Drawable, there is only a picture of a file with a question mark on it, and when I click on it it assigns @drawable/ to the src, which I think is just a reference to nothing being there. How do I get the View to be able to recognize the images? Any answers are much appreciated.

3 Answers

Seth Kroger
Seth Kroger
56,407 Points

The way Android organizes the different resolutions the drawable-*dpi/ folders need to be in res/ alongside drawable/, not inside. You'll need to copy the folders over into res/ after they've been extracted from the .zip file. If the folders already exist, you'll need to copy the files into the correct ones.

gregory stocker
gregory stocker
3,520 Points

Oh wow! Thanks for your help! Didn`t notice that.

Narain Ramjieawan
Narain Ramjieawan
639 Points

Just last night I had that same problem. :(