2017-10-06 33 views
0

我对AppLovin有问题。Applovin错误 - 重复条目:com/applovin/adview/AdViewController.class

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 

帮我解决这个问题!

+0

您是否还有一个applovin的罐子? –

+0

@ GabrieleMariotti是的! –

+0

然后就是这个问题。您将两次添加相同的库。从libs文件夹中删除这些.jars。查看下面的答案 –

回答

2

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文件夹中的应用程序库相关

+1

非常感谢您的反馈,我的问题解决了。 –

1

它看起来像是多次添加AppLovin库。从您的libs文件夹

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

或删除这些.jar文件:从您的gradle.build文件中删除此行
applovin-SDK-7.3.2.jar
applovin-SDK-7.3.2-的javadoc .jar

你只需要一个或另一个,但不是两个。

+0

@applovinjosh谢谢您的反馈 –