我尝试为API 8开发应用程序,但没有任何styles.xml的经验。对于应用程序中的活动,我使用Theme.Light。在玩风格之后,我得到了上面的错误。我也检查了这个门户网站上的其他帖子,我尝试了很多建议,但我无法进一步探讨。 styles.xml如下,希望有人会提出建议。试验样式=>找不到与给定名称匹配的资源:attr
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
<style name="ContactLabelTextView">
<item name="layout_width">wrap_content</item>
<item name="layout_height">wrap_content</item>
<item name="layout_gravity">left|center_vertical</item>
<item name="layout_marginLeft">15dp</item>
<item name="layout_marginRight">5dp</item>
<item name="layout_marginTop">5dp</item>
<item name="clickable">false</item>
<item name="longClickable">false</item>
<item name="textSize">14sp</item>
<item name="textAppearance">?android:attr/textAppearanceMedium</item>
<item name="android:textColor">@android:color/black</item>
<item name="layout_marginBottom">5dp</item>
</style>
<style name="ContactMultiplineText" >
<item name="layout_width">match_parent</item>
<item name="layout_height">wrap_content</item>
<item name="layout_marginLeft">15dp</item>
</style>
请粘贴整个堆栈跟踪。 – alanv 2014-08-29 22:38:11
请看看http://brainflush.wordpress.com/2009/03/15/understanding-android-themes-and-styles/也许它会帮助你理解造型 – 2014-08-29 23:25:03