Android Studio 记录器 TextView 字体样式 0 [英] Android Studio logger TextView TypeFace style 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
是最常用的,并且出现在每个 Material Design 教程中.
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 上,右键单击并选择Fold lines like this",然后将该行编辑为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 字体样式 0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!