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) The Model-View-Controller Pattern Creating the Story

Marko Vulic
Marko Vulic
5,079 Points

I have Trouble to setImageId.

I have Trouble to setImageId. When i type R.drawable doesn't show up "image0". Where i was make mistake?

4 Answers

Elias Adams
Elias Adams
4,263 Points

Found it, mPages[0].setImageId(R.mipmap.page0);

Elias Adams
Elias Adams
4,263 Points

Me too, please help!

Are you getting the red error squigly lines? I had that problem and had to import that class first. Click on the drawable and hit alt+enter to import the class up top. Afterwards you should be able to find the resource. Unless you do not have the files at all; to check hit res > drawable > you should varius folders labeled page0 -6.

Elias Adams
Elias Adams
4,263 Points

Thanks for your help!