1

I'm getting this error

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v7/util/SortedList$BatchedCallback.class

here is my build gradle:

apply plugin: 'com.android.application'

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




    defaultConfig {
        applicationId "com.cuztomise.services"
        minSdkVersion 11
        targetSdkVersion 21
        multiDexEnabled =true
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_7
            targetCompatibility JavaVersion.VERSION_1_7

        }
    }

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

dependencies {

    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'



    compile 'com.android.support:design:23.4.0'
    compile 'com.android.support:recyclerview-v7:23.2.1'
    compile 'com.android.support:cardview-v7:23.2.1'
    compile 'com.github.bumptech.glide:glide:3.6.1'
    compile 'com.android.support:palette-v7:23.1.1'
    compile 'de.hdodenhof:circleimageview:1.3.0'
    compile 'com.parse.bolts:bolts-android:1.+'
    compile 'com.google.http-client:google-http-client-android:+'
    compile 'com.google.api-client:google-api-client-android:+'
    compile 'com.google.api-client:google-api-client-gson:+'
    compile 'com.google.code.gson:gson:2.2.4'
    compile 'com.google.android.gms:play-services-gcm:8.3.0'
    compile 'com.google.android.gms:play-services-maps:8.3.0'
    compile 'com.android.support:multidex:1.0.1'



}
apply plugin: 'com.google.gms.google-services'
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
sanjay
  • 228
  • 2
  • 12

1 Answers1

0

Use build took SDK V- 21 and java version 1_7 or below.

https://developer.android.com/about/dashboards/index.html

Are android apps backwards compatible?

Read this one very important: Is it possible to use Java 8 for Android development?

Community
  • 1
  • 1
Cruzer
  • 143
  • 1
  • 10
  • now i changed to buildToolsVersion "21.0.0" but it is not working too – sanjay Nov 08 '16 at 10:02
  • In terminal execute in root project folder: `./gradlew clean` It helped me. Use project root in terminal like this:-/Users/venkatesh/Desktop/RankProjects/ProjectCloud After that enter this command ./gradlew clean It will work. – Cruzer Nov 08 '16 at 10:18