Alex Rivera | Logout

No line numbers in Eclipse or Android Studio XML editor

Asked 2011-04-27T00:26:27.847
59

When editing XML files in the editor for Eclipse, line numbers are not displayed.

Use case:

I create a layout with many views, one of these lacks android:layout_width attribute. This causes a runtime error when the binary XML layout resource is inflated. The error log tells me to check like 361 in my XML file.

Thanks to the line number being displayed I can find the offending line and make the change without having to open the file in another editor.

Edit
Report

1 Answer

6

In eclipse: Windows > Preferences > General > Editors > Text Editors check: "show line numbers" It is not checked by default. It is for both source code and xml files (at least in helios)

answered 2011-04-27T00:38:58.580

Your Answer