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 a Blog Reader Android App Rebuilding from Scratch Creating the Project and ListActivity

Alistair Owens
Alistair Owens
6,101 Points

BlogReader Android Project: MainListActivity.java file is completely different to that shown in the video tutorial

For some reason the MainListActivity.java file Eclipse createds when I first create the BlogReader project is very different to the one that Ben gets in the video. For a start my class MainListActivity extends the ActionBarActivity class rather than the Activity class that is extended in Ben's file. When I try to change this to ListActivity as per the video, I get errors on the file that tell me that ListActivity cannot be resolved to a type. I am using Eclipse Kepler and created the project using the same parameters Ben uses in the video. Does anyone know what is going on here?

3 Answers

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

I will record a permanent video fix shortly, but in the mean time, check the Teacher Notes on that video page (pasted below). Really sorry about this - that's the trouble of working with quickly evolving tools!

Teacher Notes

The latest version of ADT now includes Android Fragments in your project by default. So if you are creating the project from scratch, you will need to either remove the Fragment code or download the Project Files and use those instead.

Alistair Owens
Alistair Owens
6,101 Points

Great Ben, thanks. I will try one of those. Thanks for getting back to me so quickly

Did you import the required library after changing it to ListActivity? If its 'cannot be resolved as a type error'. Can you share a screenshot of what you see?

Alistair Owens
Alistair Owens
6,101 Points

Hi Gunjeet, yes I can import the requisite library which makes one error disappear but another one pops up. I think I can see most of the code in Bens video so think that I will try to copy it into my file and see where the next problem then pops up. Thanks for the response. Alistair