In layout file (xml file) if you found error: Incorrect line ending: found carriage return (\r) without corresponding newline (\n) . You should remove "\r", "\n" in your xml file. To solve this error , you can press "Ctrl + Shift + F" to remove "\r", "\n". It's so quickly.