Android Studio记录器TextView TypeFace样式0 [英] Android Studio logger TextView TypeFace style 0

查看:212
本文介绍了Android Studio记录器TextView TypeFace样式0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,对于我的应用程序所有视图中的每个TextView,我都会在logcat消息中收到以下内容:

In my project, I receive the following in a logcat message, for each TextView in all views of my app:

D/TextView: setTypeface with style : 0

我在styles.xml中使用的主题:

<style name="GreenTheme" parent="Base.Theme.AppCompat.Light">
    <item name="colorPrimary">@color/primaryGreen</item>
    <item name="colorPrimaryDark">@color/primaryDarkGreen</item>
    <item name="colorAccent">@color/accentGreen</item>

    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
</style>

我也使用buildToolsVersion "26.0.1"

我还尝试使用Theme.AppCompat.Light.NoActionBar作为父主题.消息仍然被记录.

I have also tried to use Theme.AppCompat.Light.NoActionBar as the parent theme. The messages still get logged.

更新1

经过一些测试,我发现这仅在*.Theme.AppCompat.Light.*主题下发生.

After some tests i have found that this occurs only with *.Theme.AppCompat.Light.* themes.

Theme.AppCompat.Light.NoActionBar最常用,并且在每个材料设计教程中都提供.

Theme.AppCompat.Light.NoActionBar is most often used and comes in every tutorial for material design.

如何解决此问题?

更新2

注意:使用仿真器时,不会显示此消息.这很可能是设备问题.

Note: When using an emulator, this message does not show. It's most likely a device issue.

推荐答案

在logcat上,右键单击并选择像这样的折叠行",然后将该行编辑为刚好位于"TextView ..."中的那一行-然后它们全部消失.

On logcat, right click and select "Fold lines like this" then edit down that line to just the bit from "TextView..." - then they all disappear.

这篇关于Android Studio记录器TextView TypeFace样式0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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