com.android.ide.common.process.ProcessException:无法执行aapt

时间:2016-10-11 05:24:50

标签: android eclipse android-gradle

我已将eclipse安卓项目迁移到安卓工作室,其中targetSdkVersion 19。现在,我将targetSdkVersion更改为23.现在问题是添加{{1}后Gradle显示错误进入依赖。

com.android.support:appcompat-v7:23.0.1

我的app.gradle文件:

apply plugin:'com.android.application'

Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:assembleDebug]
C:\Users\madhanhere\stories-android\app\build\intermediates\res\merged\debug\values\values.xml
Error:(190) Attribute "theme" has already been defined
Error:(190) Attribute "theme" has already been defined
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
Information:BUILD FAILED

values.xml文件:

android {
    compileSdkVersion 23
    buildToolsVersion "21.0.1"
    useLibrary  'org.apache.http.legacy'

    defaultConfig {
        applicationId "com.ebooks.stories"
        minSdkVersion 18
        targetSdkVersion 23
    }

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

dependencies {
    compile files('libs/core.jar')
    compile files('libs/logentries-android-2.1.2.jar')
    compile files('libs/picasso-2.2.0.jar')
    compile 'com.google.android.gms:play-services:5.+'
    compile 'com.facebook.android:facebook-android-sdk:3.+'
    compile 'com.android.support:appcompat-v7:23.0.1'
}

如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

我忘了更新imgplay-services version。我通过将更新buildToolsVersion更改为

来解决了这个问题
play-serivces

com.google.android.gms:play-services:6.1.+

buildToolsVersion