My debug AndroidManifest.xml is giving me "cannot resolve symbol errors"
Solution 1
Go to File > Invalidate Caches / Restart and Invalidate and Restart.
This cleared the errors for me.
Solution 2
There is no issue with your Manifest code this will work fine
<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>
Some times Eclipse shows unexpected behavior you can cut and paste again the code to Manifest or just restart the IDE it will recompile and remove the error
Solution 3
I tried all mentioned Answer but non of above worked for me
The only Solution worked for me was
Go to Gradle(App)> in the repositories {}> make sure that mavenCentral() is on top>and now remove compile 'which you recently added
>sync > Now add again compile "again add the dependencies"
> and final sync again
This worked for me
Related videos on Youtube
Argus
Updated on August 29, 2020Comments
-
Argus over 3 years
<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">
-
Argus over 10 yearsnot yet, but I did notice that the resource files for those things are missing, nonetheless, if I add it, there will be another problem, its going to start telling me that there are two packages with the same name. Should I just put my resources and packages into the debug folder?
-
Argus over 10 yearsNot using eclipse, although if I weren't so close to finishing this project I would switch. Android Studio hasn't left beta and it has given me so much grief that it just isn't worth all the hassle. I'm starting to think it probably doesn't get along very well with Windows, but what does anyway, aside from Visual Studio. I'll try your suggestion but this is in my debug folder that this manifest is at, not in my main folder, that one is working fine.
-
Trikaldarshiii over 10 years@Argus I sometimes have faced very weird behavior of eclipse; some times it doesn't show file content just move content to upper and lower lines then i just restart the IDE which resolves the problem
-
Trikaldarshiii over 10 years@Argus This may be because some the Memory used by IDE grow to peak level and then it start showing weird behavior
-
Etienne Lawlor over 10 yearsThis worked for me as well. I just wish there was some kind of indication in the IDE to restart the IDE. This is not very obvious.
-
marienke about 10 yearsWorked for me too! Thanks.
-
zipzit about 9 yearsEr no to DB:true. (extract from Android Studio...) It's best to leave out the android:debuggable attribute from the manifest. If you do, then the tools will automatically insert android:debuggable=true when building an APK to debug on an emulator or device. And when you perform a release build, such as Exporting APK, it will automatically set it to false. If on the other hand you specify a specific value in the manifest file, then the tools will always use it. This can lead to accidentally publishing your app with debug information.
-
amstegraf almost 9 yearsI always asked myself how come some know, how did you know? Are you an expert in Android Studio? I'm just curious!
-
Sandeep Londhe over 7 yearsNot Working in Android Studio 2.2.0
-
LarsH over 7 yearsI'm sure this is/was a good idea, but in Android Studio 2.2.2 it's not clearing the errors.