R kann nicht aufgelöst werden, um eine variable auf neu installierten eclipse

Bin ich auf der Suche für diese auf stack overflow für die letzten zwei Stunden und haben versucht, eine Menge Dinge, aber nichts funktionierte.

Habe ich installiert, eclipse juno, nur an diesem morgen, und ich bin immer diese Fehlermeldung R cannot be resolved to a variable in jedem Projekt, das ich erstellen. Ich kann auch nicht sehen, alle Dateien unter den gen-Ordner, auch nachdem ich das Projekt erstellen. Ich habe versucht clean-Projekt, installiert ia32 libs für mein 64 bit system läuft ubuntu, versucht, die änderung Ordner-Positionen, Neustart-system, aber nichts funktionierte.

Der generierte code ist:

package tanvi.alarm;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }


}

main.xml:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:text="@string/hello_world"
        tools:context=".MainActivity" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello_world"
        />

</RelativeLayout>

manifest:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="tanvi.alarm"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
InformationsquelleAutor tanvi | 2012-06-30
Schreibe einen Kommentar