Android manifest attribute not allowed here

后端 未结 11 1895
自闭症患者
自闭症患者 2021-02-18 13:28

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

相关标签:
11条回答
  • 2021-02-18 14:00

    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

    0 讨论(0)
  • 2021-02-18 14:09

    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.

    0 讨论(0)
  • 2021-02-18 14:11

    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.

    0 讨论(0)
  • 2021-02-18 14:13

    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.

    0 讨论(0)
  • 2021-02-18 14:14

    In Android Studio -> File -> Syncing Project with Gradle Files, helped me resolve the issue.

    0 讨论(0)
提交回复
热议问题