android-support-v7-appcompat具有与actionbarsherlock库相同的属性 [英] android-support-v7-appcompat has same attrs as actionbarsherlock library

查看:181
本文介绍了android-support-v7-appcompat具有与actionbarsherlock库相同的属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将chromecast集成到我的应用程序中,但是将android-support-v7-appcompat添加到我的项目时出现了构建问题。基本上,它具有一个attrs.xml文件,该文件的值与actionbarsherlock attrs.xml文件的值相同。有没有办法解决?这似乎有点荒谬,因为不同的库可能会冲突资源值。

I'm trying to get chromecast integration in my app but I'm having build issues when I add the android-support-v7-appcompat to my project. Basically it has an attrs.xml file that has the same values as the actionbarsherlock attrs.xml file. Is there anyway around this? This seems kind of ridiculous that different libraries can possibly conflict resource values.

推荐答案

我只是遇到了同样的问题,并且遇到了麻烦花了几个小时才弄清楚这一点。

I just encounter the same problem and had a hard time for several hours figuring this out. this is how I solved it.

如果您支持的最低SDK低于API14,通常需要support-v7-appcompat。


  1. 我删除了support-v7-appcompat作为我的库。 (这将显示有关缺少主题的错误。)

  1. I removed support-v7-appcompat as my library. (This will show error regarding missing theme.)

对于全部,所有文件夹(均为)值中的styles.xml, values-v11和values-v14

For all the styles.xml in all folders (mine are) values, values-v11 and values-v14

样式名= AppBaseTheme 父= Theme.AppCompat.Light

style name="AppBaseTheme" parent="Theme.AppCompat.Light"

替换为

样式名称= AppBaseTheme parent = android:Theme.Light

style name="AppBaseTheme" parent="android:Theme.Light"

由于某种原因,在我的菜单xml文件中。 android:showAsAction有错误。我能够通过删除它然后保存然后从我拥有的另一个文件中复制同一件事来解决它,因为我想要该功能。 (真的很奇怪,那是相同的文字。)

for some reason, in my menu xml file. it had error for android:showAsAction. I was able to solve it by deleting it then save and then copying the same thing from another file i have because I want that function. (Really weird it was just the same text.)

我对应用程序进行了夏洛克代码调整

I did my sherlock code adjustments needed for my app

我现在能够在2.3.3中运行操作栏

这篇关于android-support-v7-appcompat具有与actionbarsherlock库相同的属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆