Android studio compile error “Content is not allowed in prolog”

后端 未结 10 2061
礼貌的吻别
礼貌的吻别 2020-11-27 08:23

I use latest Android Studio 0.8.4 (for OS X), in \"res\" directory I create new \"database\" directory and put there all files what I need and when I try to compile I receiv

相关标签:
10条回答
  • 2020-11-27 09:07

    Old question but googling the error got me here.

    This was fixed for me by deleting the (empty) "navigation" folder from res, it was left over when checking out a different branch from a repository, appears it can't be empty or it will cause this error.

    0 讨论(0)
  • You can only have predefined set of folder inside res folder. so you are creating database folder inside res folder which is invalid. Either put database files inside assets folder or raw folder.

    0 讨论(0)
  • 2020-11-27 09:09

    Perform Build Clean and Rebuild Project did not work for me.

    I had to manually delete .idea/caches, then rebuild project.

    0 讨论(0)
  • 2020-11-27 09:10

    In my case, I had accidentally entered a random character right before the beginning of my strings.xml file.

    I removed the "f" character before the xml declaration and all was well again.

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