我已将依赖项添加为:
dependencIEs { compile 'com.androID.support:appcompat-v7:18.0.+'}
我没有使用自定义样式,我在AndroIDManifest.xml中设置了主题:
<application androID:icon="@drawable/icon" androID:label="@string/app_name" androID:theme="@style/theme.AppCompat" >
问题是这是在AndroID库项目中. ActionbarSherlock工作得很好.但现在我得到以下错误.
libraryProject/build/res/all/release/values/values.xml:764: error: Error: No resource found that matches the given name: attr 'dropdownListPreferredItemHeight'.libraryProject/build/res/all/release/values/values.xml:768: error: Error: No resource found that matches the given name: attr 'popupMenuStyle'.libraryProject/build/res/all/release/values/values.xml:813: error: Error: No resource found that matches the given name: attr 'dropdownListPreferredItemHeight'.libraryProject/build/res/all/release/values/values.xml:817: error: Error: No resource found that matches the given name: attr 'popupMenuStyle'.libraryProject/build/res/all/release/values/values.xml:848: error: Error: No resource found that matches the given name: attr 'dropdownListPreferredItemHeight'.libraryProject/build/res/all/release/values/values.xml:852: error: Error: No resource found that matches the given name: attr 'popupMenuStyle'.libraryProject/build/res/all/release/values/values.xml:912: error: Error: No resource found that matches the given name: attr 'actionDropDownStyle'.libraryProject/build/res/all/release/values/values.xml:925: error: Error: No resource found that matches the given name: attr 'ListChoiceBackgroundindicator'.libraryProject/build/res/all/release/values/values.xml:923: error: Error: No resource found that matches the given name: attr 'panelMenuListtheme'.libraryProject/build/res/all/release/values/values.xml:922: error: Error: No resource found that matches the given name: attr 'panelMenuListWIDth'.libraryProject/build/res/all/release/values/values.xml:969: error: Error: No resource found that matches the given name: attr 'actionDropDownStyle'.libraryProject/build/res/all/release/values/values.xml:975: error: Error: No resource found that matches the given name: attr 'ListChoiceBackgroundindicator'.libraryProject/build/res/all/release/values/values.xml:973: error: Error: No resource found that matches the given name: attr 'panelMenuListtheme'.libraryProject/build/res/all/release/values/values.xml:972: error: Error: No resource found that matches the given name: attr 'panelMenuListWIDth'.libraryProject/build/res/all/release/values/values.xml:998: error: Error: No resource found that matches the given name: attr 'actionDropDownStyle'.libraryProject/build/res/all/release/values/values.xml:1002: error: Error: No resource found that matches the given name: attr 'ListChoiceBackgroundindicator'.
可能是什么问题?有人可以提出解决方案吗?
解决方法 我终于找到了问题!看起来我的attrs.xml文件中有一个冗余声明:<declare-styleable name="theme"> </declare-styleable>
我不知道为什么我会在那里宣布这一点.可能是一些复制粘贴代码.但那是问题的根源.
我现在ActionbarCompat工作得很好.顺便说一句,ActionbarSherlock与上述声明完美配合.
总结以上是内存溢出为你收集整理的android – 切换到ActionBarCompat,但有与主题相关的构建错误全部内容,希望文章能够帮你解决android – 切换到ActionBarCompat,但有与主题相关的构建错误所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)