I have several manifest errors regarding some attributes . I have not made any changes to the manifest the application generated automatically yet i get several errors. *( I\'m
Simple thing is copy paste backup manifest.xml on the project or save code on notepad and saveas with same manifest.xml and override on old manifest.xml
For your "attribute not allowed here" problem, versionCode
, versionName
and allowBackup
have to be placed in the build.gradle
file and not in the Android Manifest. That should solve the problem.
Secondly, for your "@style/AppTheme
no resource matches the given name" problem, you will have to check your styles.xml
file and make sure that a style with the name AppTheme
exists over there.
Hope this helps you or anyone who views this answer.
In Android Studio just close the Manifest file and open it again. It will solve the issue. By the way Studio gives too many stupid errors like this.
In my case, closing the AndroidManifest.xml AND choosing File > Invalidate Caches / Restart solved the issue.
Not sure why I had to do the last step as well but it sorted out all those errors for me.
In Android Studio -> File -> Syncing Project with Gradle Files, helped me resolve the issue.