Eclipse 或 Android Studio XML 编辑器中没有行号 [英] No line numbers in Eclipse or Android Studio XML editor

查看:36
本文介绍了Eclipse 或 Android Studio XML 编辑器中没有行号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Eclipse 编辑器中编辑 XML 文件时,不显示行号.

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

用例:

我创建了一个具有许多视图的布局,其中一个缺少 android:layout_width 属性.当二进制 XML 布局资源膨胀时,这会导致运行时错误.错误日志告诉我在我的 XML 文件中检查 361.

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.

推荐答案

尝试右键单击灰色栏并选择显示行号它对我有用,所以希望它也适用于你

try right clicking the grey bar and selecting show line numbers it works for me so hopefully it will for u too

或在设置中更改它

文件 > 设置 > 编辑器 > 外观,然后点击显示行号"框.

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

这篇关于Eclipse 或 Android Studio XML 编辑器中没有行号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆