Question: IDEA reported an error: No content is allowed in the preface?
Error:Failed to load project configuration: cannot parse file :paeseError at [row,col]:[1,1]
Message: No content is allowed in the preface.
Reason for the error
xml file is in UTF-8 format with BOM header
Therefore, an error will be reported when IDEA is read. It may be caused by changes in File Encodings in IDEA's Settings settings.
The last item is selected with BOM
Solution
- First modify the settings: IDEA->File->Settings->File Encodings->with No BOM
- (Only modify the last item, just select UTF-8 for all the above three)
- Then I found the xml file that reported an error in my computer (the absolute path of the file can be seen through the error message)
- Copy the xml file, copy it to Notepad++, and select all the files
- Click on the encoding (N) to find that the current file is using UTF-8-BOM encoding, and select to convert to UTF-8 encoding.
- Finally, remember to save it.
Summarize
The above is personal experience. I hope you can give you a reference and I hope you can support me more.