[英]Resource style not found even though I already remove it and not using in Styles.xml
I created this in Styles.xml我在 Styles.xml 创建了这个
<style name="Content.Right">
<item name="android:paddingTop">60dp</item>
<item name="android:paddingLeft">20dp</item>
<item name="android:paddingRight">20dp</item>
<item name="android:paddingBottom">20dp</item>
<item name="android:background">@drawable/bg_round_corner_top_right</item>
<item name="android:backgroundTint">@color/white</item>
</style>
Then, suddenly I removed this style because I will not using it anymore, but an error occur.然后,突然我删除了这个样式,因为我不会再使用它了,但是发生了错误。
I already try to clean and rebuild the project, and reopen the Visual Studio but this error still occur.我已经尝试清理并重建项目,并重新打开 Visual Studio,但仍然出现此错误。 Also there is no file that open when I click the error.
当我点击错误时也没有打开的文件。
Additionally, after remaining the style another error occur此外,保留样式后会发生另一个错误
So I added another style in Style.xml to fix the error.所以我在 Style.xml 中添加了另一种样式来修复错误。
Why this error occur and what is the way to fix this?为什么会发生此错误以及解决此问题的方法是什么?
Other information:其他信息:
I was able to reproduce this issue.我能够重现这个问题。
Change:改变:
<style name="Content.Right">
<item name="android:paddingTop">60dp</item>
<item name="android:paddingLeft">20dp</item>
<item name="android:paddingRight">20dp</item>
<item name="android:paddingBottom">20dp</item>
....
</style>
To:到:
<style name="Content_Right">
<item name="android:paddingTop">60dp</item>
<item name="android:paddingLeft">20dp</item>
<item name="android:paddingRight">20dp</item>
<item name="android:paddingBottom">20dp</item>
...
</style>
You could refer to Naming Practices below for xml: xml可以参考下面的命名规范:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.