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_
I know this is an old question but I just came across the problem so I had to find a solution for my self. I assume the menu has changed a bit based on the previous answers that I am reading. So here is how to do it on Android Studio 1.5 on MAC.
You first click on the window "editor" that you want to see the numbers and then simply choose one of the two proposed solutions under.
The easiest way is simply right click on the grey bar as owen-gerig shows, which I think is the easiest, but if you want to set it through the menu you can via View -> Active Editor -> Show Line Numbers. Hope this helps.