Android 样式文本外观。未找到全息
我已经开发这个应用有一段时间了,在我今天更新到最新的平台工具之前,我对主题没有任何问题。现在它告诉我Android 样式文本外观。未找到全息,android,styles,Android,Styles,我已经开发这个应用有一段时间了,在我今天更新到最新的平台工具之前,我对主题没有任何问题。现在它告诉我 error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Light.Medium.Inverse'. error: Error retrieving parent for item: No resource
error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Light.Medium.Inverse'.
error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Light.Medium'.
error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Light.Large'.
这是我的styles.xml中导致问题的部分,但是,正如我所说的,它已经几个月没变了,直到今天还工作得很好
<style name="BD.TextAppearance.Medium.Inverse" parent="@android:style/TextAppearance.Holo.Light.Medium.Inverse">
<item name="android:textColor">#FFF</item>
<item name="android:textStyle">bold</item>
</style>
<style name="BD.TextAppearance.Medium" parent="@android:style/TextAppearance.Holo.Light.Medium">
<item name="android:textColor">#666666</item>
<item name="android:textSize">16sp</item>
</style>
<style name="BD.TextAppearance.Large" parent="@android:style/TextAppearance.Holo.Light.Large">
<item name="android:textColor">#666666</item>
<item name="android:textSize">20sp</item>
</style>
#FFF
大胆的
#666666
16便士
#666666
20便士
-=编辑=-
我开始混淆这些值,结果它确实发现了这些样式:
<style name="BD.TextAppearance" parent="@android:style/TextAppearance">
<item name="android:textColor">#FFF</item>
<item name="android:textStyle">bold</item>
</style>
<style name="BD.TextAppearance.Medium.Inverse" parent="@android:style/TextAppearance.Medium.Inverse">
<item name="android:textColor">#FFF</item>
<item name="android:textStyle">bold</item>
</style>
#FFF
大胆的
#FFF
大胆的
但不是这些:
<style name="BD.TextAppearance" parent="@android:style/TextAppearance.Holo">
<item name="android:textColor">#FFF</item>
<item name="android:textStyle">bold</item>
</style>
<style name="BD.TextAppearance.Medium.Inverse" parent="@android:style/TextAppearance.Light.Medium.Inverse">
<item name="android:textColor">#FFF</item>
<item name="android:textStyle">bold</item>
</style>
#FFF
大胆的
#FFF
大胆的
我也面临着同样的问题,我所做的就是我移除了
parent=“@android:style/TextAppearance.Holo.Light.Medium.Inverse”
属性。它会工作的,检查一下。我仍然不知道为什么会发生这种情况,但我已经找到了解决办法。我从Android SDK复制了styles.xml文件,并将其粘贴到我的项目中,取出了我没有使用的所有样式。我更改了所有的“父”声明,以包含“@android:”前缀,并在所有属性的“?”之后添加了“android:”。这允许它编译和运行。但是就像我说的,我真的很想知道它为什么会断裂 问题是它没有采用这些样式的预设!我想我可以定义每个属性。你现在找到原因了吗?@CaseyB,你是作为平台的一部分编译的吗?我这样问是因为TextAppearance.Holo.Light似乎出于某种原因不是公共的(即使TextAppearance.Holo是公共的)。如果使用该平台进行编译,则可以看到这些样式,但如果使用SDK进行编译,则无法找到它们。只是一个想法。不,我的意思是我可以在SDK附带的平台的res文件夹中看到它们。
error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Light.Medium.Inverse'.