Android XML Error parsing XML: junk after document element

前端 未结 2 1708
盖世英雄少女心
盖世英雄少女心 2020-12-06 05:49

I am getting this error:

Multiple annotations found at this line: - The markup in the document following the root element must be well- formed. - error

2条回答
  •  心在旅途
    2020-12-06 06:40

    An XML document can only have 1 root element. You have 3 such elements. You should enclose your TextView elements inside a layout, such as a LinearLayout:

    
    
        
    
    
    

    Remove the xmlns attribute on the first TextView element.

提交回复
热议问题