本文介绍了属性“titleTextStyle”已经定义了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将一个eclipse的android项目导入到android studio 1.2.2
我的项目毕业:

  
编译项目(':
编译项目(':swipeListViewLib')
编译项目(':library')
编译项目(':textDrawLib')
编译项目(':cardview')
compile project(':editTextFormLibrary')
compile'c​​om.android.support:support-v4:22.2.0'
compile'c​​om.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile'c​​om.google.android.gms:play-services:+'
编译文件('libs / CWAC-LocationPoller.jar')
编译文件('libs / Parse-1.8.0 .jar')
编译文件('libs / ParseCrashReporting-1.8.0.jar')
编译文件('libs / android-su pport-v13.jar')
编译文件('libs / blurnavdrawerlib.jar')
编译文件('libs / bolt-android-1.1.4.jar')
编译文件'lib / google-http-client-1.15.0-rc.jar')
编译文件('libs / google-http-client-android-1.15.0-rc.jar')
compile文件('libs / google-http-client-jackson2-1.15.0-rc.jar')
编译文件('libs / loremipsum-1.0.jar')
编译文件('libs / splunk -mint-4.0.8.jar')
编译文件('libs / textdrawlib.jar')
}

我正在获得

指向我的colors.xml,但我的xml文件甚至没有这样一个属性的这个元素。

解决方案

问题是'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
定义属性 titleTextStyle whi在另一个图书馆中也定义了ch,因此冲突升高。



其他人在添加之后与Action Bar Sherlock有相同的问题(和)其中appcompat-v7已经有一个动作栏相同的功能(相同的 titleTextStyle 属性)。建议使用ActionBar从Appcompat-v7上使用ActionBarSherlock。



在您的情况下,appcompat v7不直接添加为依赖关系,但



你正在使用最新的冲突appearead。您可以建议,只能使用appcompat或stick to actionbarsherlock并切换到7.0.0的playservices。



查看我注意到他们指导你:

这是另一个迹象,表示不使用actionbarsherlock。


I have imported an eclipse android project into android studio 1.2.2The gradle of my project:

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')
}

I am getting

pointing to my colors.xml but my xml file does not even have this element with such an attribute.

解决方案

The problem is 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'defines the attribute titleTextStyle which is also defined in another library, thus the conflict rises.

Other people have had the same problem with Action Bar Sherlock after adding it(here and here) where appcompat-v7 already had an actionbar with the same functionality (same titleTextStyle attribute as well). Using ActionBar from appcompat-v7 over ActionBarSherlock was recommended.

In your case appcompat v7 isn't directly added as a dependency however

As described in this answer

You were using the latest so the conflict appearead. You could, as suggested, use only appcompat or stick to actionbarsherlock and switch to playservices version 7.0.0.

Looking over the android support library features i noticed they guide you to:

which is another indication as not to use actionbarsherlock.

这篇关于属性“titleTextStyle”已经定义了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 03:01