Android Layout Inspector失败并出现超时错误 [英] Android Layout Inspector fails with timeout error

查看:1266
本文介绍了Android Layout Inspector失败并出现超时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在模拟器中检查应用程序的布局时,通过转到Tools => Layout Inspector,它总是会失败,并出现以下错误之一:

When I try to inspect my application's layout in a simulator, by going Tools => Layout Inspector, it always fails with one of the errors:

1.

获取视图层次结构时出错:从设备捕获布局数据时发生超时错误. 该设备可能太慢,捕获的视图可能太复杂,或者该视图可能包含动画.

Error obtaining view hierarchy: There was a timeout error capturing the layout data from the device. The device may be too slow, the captured view may be too complex, or the view may contain animations.

请以简化的视图重试,并确保设备响应.

Please retry with a simplified view and ensure the device is responsive.

2.

com.instabridge.android.dev没有显示活动窗口

No active windows displayed by com.instabridge.android.dev

布局并不特别复杂,并且不包含动画,仅映射了一些视图. Android Studio是3.4.1.我如何解决它?还是如何找到错误原因?

The layout is not particularly complex, and it does not contain animations, just map with some views. Android Studio is 3.4.1. How do I fix it? Or how to find the cause of the errors?

推荐答案

找到了一个非常奇怪的解决方案.

Found a really strange solution.

打开您的应用程序,转到android主屏幕,打开另一个应用程序,现在使用Android Studio中的布局检查器.

Open your app, go to android home screen, open another app, now use Layout inspector in Android Studio.

它起作用了,我看到了我应用的视图层次.

It worked and I see my app's view hierarchy.

更新

P.Melch声称您甚至不需要打开其他应用,请尝试仅将您的应用发送到后台.

P.Melch claims that you don't even need to open another app, try just sending your app to background.

这篇关于Android Layout Inspector失败并出现超时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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