FragmentActivity kann nicht in einen Typ aufgelöst werden

Ich versuche die Anwendung aus dieser blog. Beim ausbau der FragmentActivity erhalte ich die folgende Fehlermeldung:

`FragmentActivity` was not able to resolve.

Bin ich, fehlt jede Bibliothek oder etwas anderes?

Mein code:

public class Testing_newActivity extends FragmentActivity { //here the FragmentActivity getting error package not found for import
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.main);
        if (getResources().getConfiguration().orientation
                == Configuration.ORIENTATION_LANDSCAPE) {
            //If the screen is now in landscape mode, we can show the
            //dialog in-line so we don't need this activity.
            finish();
            return;
        }

        if (savedInstanceState == null) {
            //During initial setup, plug in the details fragment.
            DetailsFragment details = new DetailsFragment();
            details.setArguments(getIntent().getExtras());

            getSupportFragmentManager().beginTransaction().add(
                    android.R.id.content, details).commit();
        }       
    }
}

android-manifest-Datei

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.searce.testingnew"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="11" />

    <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" >
        <activity android:label="@string/app_name" android:name=".Testing_newActivity" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
Kommentar zu dem Problem
Gehen Sie durch Ihre Importe und stellen Sie sicher, dass alle benötigten vorhanden sind. (Wenn Sie post code/Fehler melden/etwas wird es leichter sein, zu helfen). Kommentarautor: kaspermoerch

InformationsquelleAutor der Frage Pratik | 2011-11-17

Schreibe einen Kommentar