Android Studio logger TextView TypeFace style 0

anatoli picture anatoli · Sep 28, 2017 · Viewed 8.3k times · Source

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

The theme I used in 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>

I also use buildToolsVersion "26.0.1"

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

UPDATE 1

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

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

How can this issue be fixed?

UPDATE 2

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

Answer

Richard Green picture Richard Green · Feb 15, 2018

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.