2017-05-31 4 views
-2

Ich habe diesen Fehler:Ausführung fehlgeschlagen für diese Aufgabe: App: transformClassesWithJarMergingForRelease

Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/android/vending/billing/IInAppBillingService$Stub$Proxy.class

mein Build grandle ist

apply plugin: 'com.google.gms.google-services' 
apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 24 
    buildToolsVersion '25.0.0' 
    defaultConfig { 
      applicationId "com.kiry32.root.quizaia" 
      minSdkVersion 16 
      targetSdkVersion 23 
      versionCode 13 
      versionName "1.3.5" 
      multiDexEnabled true 
     } 
     buildTypes { 
      release { 
       minifyEnabled false 
       proguardFiles getDefaultProguardFile('proguard-android.txt'), 
       'proguard-rules.pro' 
      } 
     } 
     productFlavors { 
     } 
    } 

    allprojects { 
     repositories { 
     jcenter() 
     maven { url "http://dl.appnext.com/" } 
    } 
} 


dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    testCompile 'junit:junit:4.12' 

    compile 'com.android.support:design:24.0.0' 
    compile 'com.google.android.gms:play-services:10.2.0' 
    compile 'com.google.firebase:firebase-ads:10.2.0' 
    compile 'com.anjlab.android.iab.v3:library:1.0.+' 
    compile 'com.appnext.sdk:ads:2.+' // Mandatory 
    compile 'com.google.android.gms:play-services-basement:10.2.0' // Mandatory 
    compile 'com.google.android.gms:play-services-location:10.2.0' 
    compile 'com.android.support:multidex:1.0.1' 
} 

und andere grandle

// Top-level build file where you can add configuration options common to 
all sub-projects/modules. 

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.3.2+' 
     classpath 'com.google.gms:google-services:3.1.0+' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

Wie kann ich diesen Fehler zu beheben ? Bevor ich die appnext Werbung platzierte, machte es mich apk

Vielen Dank im Voraus !!!

Antwort

0

Dies passiert, weil appnext auch die Google Play Services-Bibliothek enthält. Entfernen Sie kompilieren 'com.google.android.gms:play-services:10.2.0' und nur den Teil von Google Play-Dienste, die Sie wirklich brauchen. Genau wie Sie haben

hinzugefügt
compile 'com.google.android.gms:play-services-basement:10.2.0' // Mandatory 
compile 'com.google.android.gms:play-services-location:10.2.0' 
0

ich verändert, wie Sie gesagt haben, aber es geht mir den gleichen Fehler geben Grandle ist:

apply plugin: 'com.google.gms.google-services' 
apply plugin: 'com.android.application' 



android { 
compileSdkVersion 25 
buildToolsVersion '25.0.0' 
defaultConfig { 
    applicationId "com.kiry32.root.quizaia" 
    minSdkVersion 16 
    targetSdkVersion 23 
    versionCode 13 
    versionName "1.3.5" 
    multiDexEnabled true 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro' 
    } 
} 
productFlavors { 
} 
} 

allprojects { 
repositories { 
    jcenter() 
    maven { url "http://dl.appnext.com/" } 
} 
} 


dependencies { 
compile fileTree(include: ['*.jar'], dir: 'libs') 
testCompile 'junit:junit:4.12' 


compile 'com.android.support:design:25.3.1' 

compile 'com.google.firebase:firebase-ads:10.2.0' 
compile 'com.anjlab.android.iab.v3:library:1.0.+' 
compile 'com.appnext.sdk:ads:2.+' // Mandatory 
compile 'com.google.android.gms:play-services-basement:10.2.0' // Mandatory 
compile 'com.google.android.gms:play-services-location:10.2.0' 
compile 'com.android.support:multidex:1.0.1' 

}

Verwandte Themen