完美解决 Attribute “titleTextStyle” has already been defined
来源:互联网 发布:中科恒运大数据 编辑:程序博客网 时间:2024/05/17 23:12
问题出现原因
在Android Studio中准备引入Eclipse中的项目,而此项目中包含了第三方库actionbarsherlock,是一个作者不再维护的库。在我把此项目引入到Android Studio中编译时,提示了”Attribute “titleTextStyle” has already been defined” 这样的错误。
因为我是在Android Studio中新建了一个module,然后再把actionbarsherlock里面的资源和代码放进新的module中的。
新建的module中的build.gradle中默认带有
com.android.support:appcompat-v7:23.4.0
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.4.0'}
就是因为此导入的库和actionbarsherlock中的attr属性有冲突导致的。
解决问题方法
删掉 com.android.support:appcompat-v7:23.4.0 ,
改为:com.google.android.gms:play-services:7.0.0
如:
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.google.android.gms:play-services:7.0.0'}
重新clear项目后,再编译就可以解决此问题啦
1 0
- 完美解决 Attribute “titleTextStyle” has already been defined
- Attribute "title" has already been defined 异常解决
- 解决Attribute "rippleColor" has already been defined的问题
- Attribute "XXX" has already been defined
- Attribute "XXX" has already been defined
- error: Attribute "buttonBarStyle" has already been defined
- Attribute "roundWidth" has already been defined
- Android开发(25) 如何解决Attribute "XXX" has already been defined
- 报错:Attribute ”rippleColor“ has already been defined”(纯手打,已解决)
- 引用工程时 error: Attribute "color" has already been defined
- Attribute "xxx" has already been defined
- Android 问题:Attribute "xxx" has already been defined
- Error:(2) Attribute "titleTextColor" has already been defined
- Android SlidingMenu导入ActionBar,Attribute "xxx" has already been defined
- 多个类定义attr属性重复的问题:Attribute "xxx" has already been defined
- 自定义view中xml属性 提示Attribute "XXX" has already been defined
- 【android】多个类定义attr属性重复的问题:Attribute "xxx" has already been defined
- 多个类定义attr属性重复的问题:Attribute "xxx" has already been defined
- python练习100例(上)(解答)
- 升级ubuntu中的gcc和g++版本
- 数组数据采用ArrayDataProvider 动态分页应用(可用于接口缓存场景) [ 2.0 版本 ]
- 【框架-MFC】保存HICON或HCURSOR对象到*.ico文件
- 学习笔记:iOS布局库—MyLayout库之表格布局MyTableLayout
- 完美解决 Attribute “titleTextStyle” has already been defined
- ios开发--如何在 iOS 中解决循环引用的问题(FBRetainCycleDetector框架)
- linux包解压
- eclipse插件开发 -右键菜单 - popup menu
- Java ——多线程编程
- 学习笔记:iOS布局库—MyLayout库之流式布局MyFlowLayout
- 白话字符编码和字符集
- javascript数字类型(Number)不精确问题
- android ViewPager 使用详解