In Android Studio 1.3.2 (a variety of IntelliJ Idea) you can find the "Show line numbers" checkbox under:
Android Studio > Preferences > Editor > General > Appearance
Or, if you type "line numbers" into the main search box you'll be presented with a switch you can set right there.