Problem with listing 9.10


#1

Hello,

I am receiving the following error by my eclipse IDE:

“Unable to resolve superclass of com/example/criminalintent/SingleFragmentActivity”

Here is my code:

[code]package com.example.criminalintent;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;

public abstract class SingleFragmentActivity extends FragmentActivity {
protected abstract Fragment createFragment();

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_fragment);
    
    FragmentManager fm = getSupportFragmentManager();
    Fragment fragment = fm.findFragmentById(R.id.fragmentContainer);
    
    if (fragment == null) {
    	fragment = createFragment();
    	fm.beginTransaction()
    		.add(R.id.fragmentContainer, fragment)
    		.commit();
    }
}

}
[/code]

I have a feeling something with my Eclipse configuration is screwed up…but I am not sure.