My debug AndroidManifest.xml is giving me "cannot resolve symbol errors"

Argus picture Argus · Sep 21, 2013 · Viewed 48.8k times · Source
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="ac.tec.oop.ahorcado.android"
          android:versionCode="1" 
          android:versionName="1.0">

    <uses-sdk android:minSdkVersion="7" 
              android:targetSdkVersion="16"/>

    <application android:allowBackup="true" 
                    android:icon="@drawable/ic_launcher" 
                    android:label="@string/app_name" 
                    android:theme="@style/AppTheme">
        <activity android:label="@string/app_name"
                  android:name="ac.tec.oop.ahorcado.android.MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

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

</manifest>

These lines are giving me "cannot resolve symbol errors", even though the packages from which they need to be referenced is clearly written. I've trying to fix this for hours but I don't know what else to do. I'm using Android Studio, and it has caused me a great number of problems.

android:icon="@drawable/ic_launcher 
android:label="@string/app_name" 
android:theme="@style/AppTheme">
android:name="ac.tec.oop.ahorcado.android.MainActivity">

Answer

Mohamed picture Mohamed · Dec 19, 2013

Go to File > Invalidate Caches / Restart and Invalidate and Restart.

This cleared the errors for me.