首页 > 解决方案 > 程序类型已存在:com.amazon.device.ads.AAXCreative 使用亚马逊广告 API

问题描述

我想在我的项目中使用 Amazon API。当我构建项目时出现此错误

程序类型已存在:com.amazon.device.ads.AAXCreative Message{kind=ERROR, text=程序类型已存在:com.amazon.device.ads.AAXCreative, sources=[Unknown source file], tool name=Optional。 (D8)}


这是 build.gradle(Module:app)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.example.jaypr.vyble"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation 'com.google.android.gms:play-services-games:15.0.1'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.amazon.android:mobile-ads:5.+'
}

我尝试了所有找到的解决方案,但对我没有任何效果。我是android开发的新手。我想知道为什么会这样。

标签: androidamazon

解决方案


当我删除下面的实现时它起作用了

实施 'com.amazon.android:mobile-ads:5.+'

因为我已经使用了app下libs文件夹中的jar文件。


推荐阅读