Sunday, 11 January 2015

[FIX: Eclipse - Android layout file] - Incorrect line ending: found carriage return (\r) without corresponding newline (\n)

I hit this annoying issue today - I think due to copy and pasting code. Within my layout file in Android I'm getting the following error:

Incorrect line ending: found carriage return (\r) without corresponding newline (\n)



Closing the layout and deleting the problematic elements did not help. However, the fix is easy:


  1. Open your layout file. 
  2. Press Ctrl + Shift + F
  3. Save the layout file. 

Hope this saves someone time in the future!

No comments:

Post a Comment

Android Studio - How to change app icon (ic_launcher)

Changing your applications icon (ic_launcher) is a common occurrence when developing your android application. Here's quick steps on how...