Applovin 错误 - 重复条目:com/applovin/adview/AdViewController.class

Applovin error - duplicate entry: com/applovin/adview/AdViewController.class

我在 AppLovin 上有问题。

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/applovin/adview/AdViewController.class

我的gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    useLibrary 'org.apache.http.legacy'

defaultConfig {
    applicationId "in.earnpaytm.dhankubair"
    minSdkVersion 16
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'

compile 'com.google.android.gms:play-services:9.6.1'
compile 'cn.pedant.sweetalert:library:1.3'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.mcxiaoke.volley:library:1.0.18'
compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
compile 'com.google.android.gms:play-services-gcm:9.6.1'
compile 'com.google.android.gms:play-services-ads:9.6.1'
compile 'com.google.android.gms:play-services-fitness:9.6.1'
compile 'com.google.android.gms:play-services-wearable:9.6.1'
compile 'com.applovin:applovin-sdk:7.3.2'
compile 'com.github.paolorotolo:appintro:4.1.0'



testCompile 'junit:junit:4.12'


compile 'com.android.support:multidex:1.0.1'

compile 'com.google.firebase:firebase-messaging:9.6.1'


}
dependencies {
    compile 'com.google.android.gms:play-services-ads:9.6.1'
}
dependencies {
    compile 'com.google.android.gms:play-services-auth:9.6.1'
}
dependencies {
    compile 'com.google.android.gms:play-services-gcm:9.6.1'
}

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

我的清单

<meta-data android:name="applovin.sdk.key" android:value="3Uwn4udUbwnsMOvbmpDJ7IEegaoOPqmSIgDNZrtd061wiokw5rCKUuwGGJ50nNg_mFqdPaFPgHKO32J9uVTM"  />
        <activity android:name="com.applovin.adview.AppLovinInterstitialActivity" android:configChanges="orientation|screenSize"/>
        <activity android:name="com.applovin.adview.AppLovinConfirmationActivity" android:configChanges="orientation|screenSize"/>

我有两个applovin sdk

1.applovin-sdk-7.3.2
2.applovin-sdk-7.3.2-javadoc

帮我解决这个问题!

您似乎多次添加 AppLovin 库。从您的 gradle.build 文件中删除此行:

compile 'com.applovin:applovin-sdk:7.3.2'

或从您的 libs 文件夹中删除这些 .jars:
applovin-sdk-7.3.2.jar
applovin-sdk-7.3.2-javadoc.jar

你只需要其中之一,而不是两者都需要。

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/applovin/adview/AdViewController.class

这意味着你在添加两次相同的类。

根据您的评论:

Do you have also a jar for applovin?
@GabrieleMariotti Yes!

因为您正在使用:

compile 'com.applovin:applovin-sdk:7.3.2'

从您的 libs 文件夹

中删除 与 applovin 库相关的 .jars