"Swift Basics" was retired on May 31, 2020.

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 Exploring the Master-Detail Template Creating a Project Using the Master-Detail Template

Wonhyuk Jang
Wonhyuk Jang
5,666 Points

Even though I installed Eclipse through the link that you posted, I get bunch of errors.

This is the problem which i have.

public class BlogPostDetailActivity extends ActionBarActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_blogpost_detail);

    // Show the Up button in the action bar.
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);

View rootView = inflater.inflate(R.layout.fragment_blogpost_detail, container, false);

    // Show the dummy content as text in a TextView.
    if (mItem != null) {
        ((TextView) rootView.findViewById(R.id.blogpost_detail))
                .setText(mItem.content);
    }

setContentView(R.layout.activity_blogpost_list);

    if (findViewById(R.id.blogpost_detail_container) != null) {
        // The detail container view will be present only in the
        // large-screen layouts (res/values-large and
        // res/values-sw600dp). If this view is present, then the
        // activity should be in two-pane mode.
        mTwoPane = true;

        // In two-pane mode, list items should be given the
        // 'activated' state when touched.
        ((BlogPostListFragment) getSupportFragmentManager()
                .findFragmentById(R.id.blogpost_list))
                .setActivateOnItemClick(true);
    }

and I also have error from values folder inside of res.

Please help me how to solve this problem.

I have tried so many times erasing eclipse and downloading it again.

But I still have same error.

Thank you

2 Answers

Wonhyuk Jang
Wonhyuk Jang
5,666 Points

When I open this project, it also said that Parsing Data for android-L failedUnsupported major.minor version 51.0 error eclipse

If you create a new workspace those errors will disapear! I don't know why this happen but have something to do with the imports.

Create this project in a new workspace intead the one you used for the crystall ball app.

Besides this make sure to create the project for the API 14 for minimun SDK ans 19 for the target and compiler.

I had the same problem and this solved it.

Wonhyuk Jang
Wonhyuk Jang
5,666 Points

Thank you so much

But I have found another problem. When I reopened Eclipse, it says that ailed java.lang.NullPointerException

and also I can't open emulator as well. can you please help me out to solve the problem?