Warning message for Android: trying to get a bag that is invalid or in a loop

A warning message appears in LogCat:

ResourceType: attempt to get bag 0x7f080015 that is invalid or in loop.

The warning message repeats 50+ times, which is really annoying. What does it mean? And how do I leave him?

+5
source share
2 answers

The reason is that the project has a style defined under "values-fr", but which has no analogues in the default values ​​folder.

+6
source

I received this message because I used the following method to override styles for different API levels:

<style name="ToolBar" parent="ToolBar.Base"/>

<style name="ToolBar.Base">
    <item name="android:layout_width">match_parent</item>
    <item name="android:layout_height">?actionBarSize</item>
    <item name="android:background">@color/primary</item>
</style>

And then adding

<style name="ToolBar" parent="ToolBar.Base">
    <item name="android:elevation">4dp</item>
</style>

v21/styles. ToolBar , . - , . , , , Android .

, ToolBar.Base ToolBar_Base .

+2

All Articles