development

Eclipse 또는 Android Studio XML 편집기에 줄 번호가 없습니다.

big-blog 2020. 12. 13. 10:13
반응형

Eclipse 또는 Android Studio XML 편집기에 줄 번호가 없습니다.


Eclipse 용 편집기에서 XML 파일을 편집 할 때 줄 번호가 표시되지 않습니다.

사용 사례 :

많은 뷰가있는 레이아웃을 생성하는데 그중 하나에는 android : layout_width 속성이 없습니다. 이진 XML 레이아웃 리소스가 확장되면 런타임 오류가 발생합니다. 오류 로그는 내 XML 파일에서 361과 같이 확인하라고 알려줍니다.

표시되는 줄 번호 덕분에 다른 편집기에서 파일을 열지 않고도 문제가되는 줄을 찾고 변경할 수 있습니다.


회색 막대를 마우스 오른쪽 버튼으로 클릭하고 표시 줄 번호를 선택하십시오.

여기에 이미지 설명 입력

여기에 이미지 설명 입력

또는 설정에서 변경

파일> 설정> 편집기> 모양새 "줄 번호 표시"상자를 클릭합니다.


Android 스튜디오를 사용하는 경우 로 이동 File > Settings > Editor > General > Appearance하여 '줄 번호 표시'체크 박스를 선택 하여 줄 번호를 표시 할 수 있습니다 .

업데이트 : Android Studio v1.5 이상여기에 이미지 설명 입력

1) 편집기 내부를 클릭하고 Command + Shift + A 를 누르고 "show line numbers"를 입력합니다.

2) Preferences에서 두 번째 옵션을 선택하면 General> Appearance에 존재하던 화면으로 이동합니다.

3) "줄 번호 표시"상자를 선택하십시오.


파일> 설정> 편집기> 모양새 "줄 번호 표시"상자를 클릭합니다.

여기에 이미지 설명 입력


Eclipse에서 : Windows> 환경 설정> 일반> 편집기> 텍스트 편집기 확인 : "줄 번호 표시"기본적으로 선택되어 있지 않습니다. 소스 코드와 xml 파일 모두를위한 것입니다 (적어도 helios에서는)


To make the line numbers always show for Android Studio:

File > Settings > Editor > Appearance then click the "Show line numbers" box.

The accepted answer works, but it will only make the line numbers visible on the active editor.


On OS X: Android Studio (top left of the screen) > Preferences > Editor > Appearance.


Dec 2013: Starting with Eclipse 4.4, you won't have to look for an option to see line numbers, because they will be visible by default.

Regarding Android Studio, this is another story: since May 2013, Android Studio 0.3.x+ is based on IntelliJ IDEA.
See "How can I permanently have line numbers in IntelliJ?".


Lars Vogel just published on his blog:

Line numbers are default in Eclipse SDK Luna (4.4) as of today

(December 10, 2013)

We conducted a user survey if users want to have line numbers activated in text editors in the Eclipse IDE by default.
The response was very clear:

YES : 80.07% (1852 responses)
NO  : 19.93% (461 responses)
Total  : 2313
Skipped:   15

With Bug 421313, Review - Line number should be activated by default, we enabled it for the Eclipse SDK build, I assume other Eclipse packages will follow.


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.

MAC 용 Android Studio 1.5의 줄 번호 매기기


To make the line numbers show always in your android studio, follow this, go to: File > Settings > Editor > General > Appearance and then check the "Show line numbers" box especially if you are using AS 2.1.1. Picture here below...How to show line numbers in Android Studio 2.1.1

참고URL : https://stackoverflow.com/questions/5798009/no-line-numbers-in-eclipse-or-android-studio-xml-editor

반응형