Error on line 2 at column 6: XML declaration allowed only at the start of the document
Error on line 2 at column 6: XML declaration allowed only at the start of the document

Error on line 2 at column 6: XML declaration allowed only at the start of the document

问题复现:在一台新的电脑配置阿里云maven远程仓库时,在IDEA导入setting.xml,发现配置不生效,在浏览器打开setting.xml发现如下报错:error on line 2 at column 6: XML declaration allowed only at the start of the document

解决方法:

把下面这一行,放在文件的开头,删除第一行空行

重新在浏览器打开xml,发现报错消失,IDEA配置生效。

 

浏览量: 7

发表回复