为什么Android Studio在布局检查器的属性面板中没有显示相应的布局文件?
我正在尝试检查片段的布局,并且我想打开包含所选视图的正确 xml 文件。
当我谷歌搜索它时,我发现 Android Studio 允许我们这样做,如果我们在设备上运行我们的应用程序> 29.
当我尝试时,我发现对于某些项目,Android Studio 确实显示了写入视图的正确 xml 文件。但是,对于其他项目,它不会显示该信息。
为了更清楚地说明这一点,这里有两个不同项目的屏幕截图。
此处,Android studio 仅显示按钮的 @id/buttonAddNew
。但它不显示 xml 文件。
但是,这里 Android Studio 显示了 @id/imageViewNotificationBell
以及 home_fragment.xml
文件名和行号。
那么,我该如何解决这个问题呢?
I am trying to inspect layout for a fragment, and I want to open correct xml file which does contain the selected view.
When I google about it, I found that Android Studio allow us to do that if we are running our application on device > 29.
While I was trying it, I found that for some projects Android Studio does show the correct xml file in which the view is written. But, for other projects it does not show that information.
To clear it more, here are 2 screenshots of the different projects.
Here, Android studio only shows the @id/buttonAddNew
for the button. But it does not show the xml file.
But, here Android Studio shows the @id/imageViewNotificationBell
along with the home_fragment.xml
file name and line number.
So, how can I solve this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论