Error attribute has already been defined

5.1k Views Asked by At

i know this question have been asked a lot..but I can't resolve this problem.I'm a newbie, help me. So, there are code in my gradle build:


        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 'com.android.support:support-v4:18.0.0'
        compile files('libs/StartAppInApp-2.4.7.jar')
    }

and this is my error:


    Error:(160) Attribute "background" already defined with incompatible format.
    Error:(14) Original attribute defined here.
    Error:(197) Attribute "navigationMode" already defined with incompatible format.
    Error:(160) Original attribute defined here.
    Error:(197) Attribute "displayOptions" already defined with incompatible format.
    Error:(160) Original attribute defined here.
    Error:(212) Attribute "windowMinWidthMajor" already defined with incompatible format.
    Error:(206) Original attribute defined here.
    Error:(212) Attribute "windowMinWidthMinor" already defined with incompatible format.
    Error:(206) Original attribute defined here.
    Error:(212) Attribute "actionBarSize" already defined with incompatible format.
    Error:(206) Original attribute defined here.
    Error:Execution failed for task ':app:processDebugResources'.
    > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Truc\AppData\Local\Android\Sdk\build-tools\24.0.1\aapt.exe'' finished with non-zero exit value 1

Thank you!

1

There are 1 best solutions below

2
RamithDR On BEST ANSWER

Please try following these steps:

  1. Put .jar file into the libs folder.
  2. Right click on it and click 'Add as Library'.
  3. Add this line compile files('libs/StartAppInApp-2.4.7.jar') or this line if you have more than one .jar file : compile fileTree(dir: 'libs', include: '*.jar').
  4. Do a clean build.

This method worked for me.