Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/185.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 属性";titleTextStyle“;已经定义了吗?_Android - Fatal编程技术网

Android 属性";titleTextStyle“;已经定义了吗?

Android 属性";titleTextStyle“;已经定义了吗?,android,Android,我已经将EclipseAndroid项目导入到android studio 1.2.2中 我的项目的梯度: dependencies { compile project(':unifiedPreferenceLib') compile project(':viewPagerIndicatorLib') compile project(':slidingUpFourSquare') compile project(':stylishDialogLib') c

我已经将EclipseAndroid项目导入到android studio 1.2.2中 我的项目的梯度:

dependencies {
    compile project(':unifiedPreferenceLib')
    compile project(':viewPagerIndicatorLib')
    compile project(':slidingUpFourSquare')
    compile project(':stylishDialogLib')
    compile project(':swipeListViewLib')
    compile project(':library')
    compile project(':textDrawLib')
    compile project(':cardview')
    compile project(':editTextFormLibrary')
    compile 'com.android.support:support-v4:22.2.0'
    compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
    compile 'com.google.android.gms:play-services:+'
    compile files('libs/CWAC-LocationPoller.jar')
    compile files('libs/Parse-1.8.0.jar')
    compile files('libs/ParseCrashReporting-1.8.0.jar')
    compile files('libs/android-support-v13.jar')
    compile files('libs/blurnavdrawerlib.jar')
    compile files('libs/bolts-android-1.1.4.jar')
    compile files('libs/google-http-client-1.15.0-rc.jar')
    compile files('libs/google-http-client-android-1.15.0-rc.jar')
    compile files('libs/google-http-client-jackson2-1.15.0-rc.jar')
    compile files('libs/loremipsum-1.0.jar')
    compile files('libs/splunk-mint-4.0.8.jar')
    compile files('libs/textdrawlib.jar')
}
我越来越

错误:(1)已定义属性“titleTextStyle”


指向my colors.xml,但我的xml文件甚至没有具有此属性的元素。

问题在于
'com.actionbarsherlock:actionbarsherlock:4.4。0@aar“
定义属性
titleTextStyle
,该属性也在另一个库中定义,因此冲突会增加

其他人在添加了Action Bar Sherlock之后也遇到了同样的问题,appcompat-v7已经有了一个具有相同功能的Action Bar(同样的
titleTextStyle
属性)。建议在ActionBar上使用appcompat-v7中的ActionBar Sherlock

但是,在您的情况下,appcompat v7并没有直接添加为依赖项

如中所述

谷歌Play服务的最新版本现在使用appcompat-v7,所以u 不能与actionbarsherlock一起使用。您只能使用appcompat-v7 或播放服务的早期版本:

compile 'com.google.android.gms:play-services:7.0.0'
您使用的是最新版本,因此出现了冲突。按照建议,您可以只使用appcompat或坚持使用actionbarsherlock并切换到playservices 7.0.0版

仔细看,我注意到它们引导你:

通常,我们建议包括v4支持和v7 appcompat 库,因为它们支持广泛的Android版本和 为推荐的用户界面模式提供API


这是另一个不使用actionbarsherlock的指示。

我已经通过完全删除actionbarsherlock库解决了这个问题。我一直在使用的一个特定的库项目依赖于actionbarsherlock。我调整了这个库来编译,而不需要actionbarsherlock。不管怎么说,你说的似乎是对的。如果我确实需要使用两个库来定义特定视图的属性,使用declare styleable,但是即使视图有不同的包,属性名称也是相同的呢?我该如何处理这个问题?@androiddeveloper这似乎是一个足够广泛的问题,许多用户都会遇到,因此值得提出自己的问题。在过去的两个月中,仅此一个问题就受到了无数的关注。我建议你单独发布你的问题,我会在有时间的时候回答,除非其他人在此之前提供了相关的答案。干杯编译'com.google.android.gms:play services:7.0.0'解决了这个问题,谢谢!