android - I/Counters: exceeded sample count in FrameTime log
问题描述
I recently started to see this logs I/Counters: exceeded sample count in FrameTime multiple times in my app logcat, I understood it comes from Google Maps.
Any idea what it means? and how to get rid of it?
解决方案
尝试禁用小部件的几层(例如使用“myLocationEnabled”参数启用的“myLocation”层)并在发布版本中重新启用它们。还要确保你在 dispose 方法中处理你的谷歌地图控制器(如果你在从 onMapCreated 获取它之后将它存储在某个地方)。
据我从错误和 API 文档中可以看出,GoogleMaps 有多个图层,每个图层都需要在给定的 FrameTime 中构建。由于多层的额外负担减慢了处理速度,它可能会超过给定的 FrameTime 并触发错误。
原因还可能包括调试版本没有优化并且确实影响 GoogleMaps 包的事实。我尝试了相同的应用程序,在真实设备上的发布版本中不断出现“I/Counters:FrameTime 中的样本计数超出”错误,并且错误似乎没有出现,这意味着这些错误可以简单地忽略。
推荐阅读
- asp.net - ASP.Net 中的 JsonConvert
- android - 从 2019 年 1 月 9 日起,不允许从 api 级别 26 的更高版本中的 SMSes 自动读取 OTP?
- r - 如何在R中重新缩放栅格图层?
- python - 如何检查列表中的任何进程是否正在运行?
- react-native - 当我从反应原生的一个选项卡导航到另一个页面时,如何从顶部删除选项卡栏
- java - 如何在数组索引处打印字符串数组?
- swift - 将我的结构放在哪里以保持班级独立?
- jquery - DatePicker 不是 Jquery 中的函数
- javascript - 在nodejs中的循环内等待承诺
- java - Android cardview 将特定卡片放在列表末尾