【问题标题】:Android Studio conflict between actionbarsherlock and appcompat-v7actionbarsherlock 和 appcompat-v7 之间的 Android Studio 冲突
【发布时间】:2015-11-01 17:04:07
【问题描述】:

我开始使用 eclipse 和 actionbarsherlock 开发的旧应用程序。我需要将它导入到 android studio,我遇到了一些我无法解决的问题。 当我尝试导入一些像这样的错误弹出

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

我读到这是因为 actionbarsherlock 和 appcompat-v7 有冲突,解决方案可能是删除 appcompat-v7,但我不知道怎么做。这是我的构建等级:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "xxx"
        minSdkVersion 14
        targetSdkVersion 21
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:support-v4:18.0.0'
    compile 'com.google.android.gms:play-services:+'
    compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
    compile files('libs/adobeMobileLibrary-4.4.0.jar')
    compile files('libs/AppMeasurement_Android.jar')
    compile files('libs/google-play-services.jar')
    compile files('libs/jackson-core-asl-1.9.13.jar')
    compile files('libs/jackson-mapper-asl-1.9.13.jar')
    compile files('libs/zbar.jar')
}

我在外部库中看到了 appcompat-v7,但我不知道如何删除它。

非常感谢您的帮助。

【问题讨论】:

  • 尝试将 'com.google.android.gms:play-services:+' 更改为 'com.google.android.gms:play-services:7.0.0'。较新版本的 Play Services 库也声明了“titleTextStyle”。

标签: android eclipse android-studio actionbarsherlock android-appcompat


【解决方案1】:

尝试将“com.google.android.gms:play-services:+”更改为“com.google.android.gms:play-services:7.0.0”。 Play Services 库的较新版本也声明了“titleTextStyle”。 – FractalBob 刚刚编辑

【讨论】:

    猜你喜欢
    • 2015-12-04
    • 1970-01-01
    • 2016-01-12
    • 1970-01-01
    • 1970-01-01
    • 2013-10-27
    • 2013-10-04
    • 1970-01-01
    • 2018-11-10
    相关资源
    最近更新 更多