简体   繁体   中英

Potential Cycle - Lint check

Why does Lint throwing the error " Cycle in resource definitions "?

My Resources are as follow in themes.xml:
<style name="Theme.AppName.Holo.Dark" parent="@android:style/Theme.Holo.Dialog">

This themes parent is the @android:style/Theme.Holo.Dialog !

Another Theme is:
<style name="Theme.AppName" parent="@style/Theme.AppName.Holo.Dark">

This themes parent is the above Theme.AppName.Holo.Dark !

So why should this be a cycle? A cycle would be if the first themes parent is "Theme.AppName".

Problem is the naming. Because of Theme.AppName.Holo.Dark is the first one.

If I change it to:
<style name="Theme.AppName" parent="@android:style/Theme.Holo.Dialog">

And the second one to:
<style name="Theme.AppName.Holo.Dark" parent="@style/Theme.AppName">

The error is gone away.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM