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 (Retired) User Input Introducing ImageViews

How to add images to drawable in android 1.4?

I have downloaded latest android studio (1.4), but the project images do not show in drawable when I copy and paste them.

2 Answers

Seth Kroger
Seth Kroger
56,413 Points

The various drawable directories need to be alongside each other in res, not inside drawable. If your current file tree is like this...

res
|--drawable
|   |--drawable-hdpi
|   |--drawable-mdpi
|   \--[other drawable folders...]
|
|--layout
\--[etc...]

Instead it should look like this.

res
|--drawable
|--drawable-hdpi
|--drawable-mdpi
|--[other drawable folders...]
|--layout
\--[etc...]

You can take a look at the official docs on providing resources here: http://developer.android.com/guide/topics/resources/providing-resources.html

Conuir Williamson
Conuir Williamson
7,825 Points

I don't know if the Teacher Notes are how shibashis ran into this problem, but I read it as though the drawable-...dpi folders should be contained within the drawable folder.

Thanks for clarifying this, Seth.