有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

mopub整型时发生java错误

我正在应用程序中集成MOPUB-ADs。我正在遵循来自https://www.mopub.com/resources/docs/安卓-sdk-integration/安卓-getting-started/

在加入mopub-volley-1.1.0之后。jar,我有以下错误

错误:任务“:app:transformClassesWithJarMergingForDebug”的执行失败。通用域名格式。安卓建筑应用程序编程接口。使改变例外:java。util。拉链ZipException:重复条目:com/mopub/volley/AuthFailureError。阶级

我的身材。格雷德尔代码是

apply plugin: 'com.安卓.application'
安卓 {
    compileSdkVersion 24
    buildToolsVersion '24.0.1'

    defaultConfig {
        multiDexEnabled true
        applicationId "com.mopubdemo.安卓"
        minSdkVersion 16
        targetSdkVersion 24
        versionCode 27
        versionName '2.05'
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-安卓.txt'), 'proguard-rules.pro'
        }
    }

    packagingOptions {
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LGPL2.1'
        exclude 'META-INF/plexus/components.xml'
   }
}

dependencies {
   compile files('libs/universal-image-loader-1.9.3.jar')
   compile files('libs/FlurryAnalytics-6.2.0.jar')
   compile files('libs/acra-4.6.1.jar')

   compile project(':mopub-sdk:mopub-sdk-native-video')
   compile project(':mopub-sdk:mopub-sdk-native-static')
   compile project(':mopub-sdk:mopub-sdk-banner')
   compile project(':mopub-sdk:mopub-sdk-rewardedvideo')
   compile project(':mopub-sdk')
   compile project(':mopub-sdk:mopub-sdk-interstitial')

   安卓TestCompile 'junit:junit:4.12'
   compile 'com.安卓.support:multidex:1.0.1'
   compile 'com.github.johnkil.安卓-robototextview:robototextview:2.4.2'
   compile 'com.google.code.gson:gson:2.4'
   compile 'com.rengwuxian.materialedittext:library:2.1.4'
   compile 'com.nhaarman.listviewanimations:lib-core:3.1.0@aar'
   compile 'com.nhaarman.listviewanimations:lib-manipulation:3.1.0@aar'
   compile 'com.nhaarman.listviewanimations:lib-core-slh:3.1.0@aar'
   compile 'org.ocpsoft.prettytime:prettytime:4.0.0.Final'
   compile 'com.koushikdutta.ion:ion:2.1.6'
   compile 'pub.devrel:easypermissions:0.1.5'
   compile 'com.安卓.support:appcompat-v7:24.2.1'
   compile 'com.安卓.support:cardview-v7:24.1.1'
   compile 'com.安卓.support:support-v4:24.1.1'
   compile 'com.安卓.support:recyclerview-v7:24.1.1'
   compile 'com.安卓.support:support-annotations:24.1.1'
   compile 'com.google.安卓.gms:play-services:10.2.1'

  compile files('libs/mopub-volley-1.1.0.jar')
}

共 (1) 个答案

  1. # 1 楼答案

    删除此行,然后同步

    compile files('libs/mopub-volley-1.1.0.jar')