我目前正在使用 Google Admob 在我的应用中展示广告,我想添加中介,因为我对填充率不满意。我按照他们在网站上的步骤,按照他们的步骤通过调解整合了 Adcolony。我添加了 adcolony.jar 文件并使用 Android Studio 将其与 Gradle 同步。在集成过程中,我在我的应用级 build.gradle 中添加了这些行,
repositories {
jcenter()
maven {
url "https://adcolony.bintray.com/AdColony"
}
}
...
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.android.gms:play-services-ads:19.0.0'
implementation 'com.google.ads.mediation:adcolony:4.1.3.1'
}
...
运行我的应用程序后,调试控制台会抛出以下错误:
Duplicate class com.iab.omid.library.adcolony.walking.a.e found in modules jetified-adcolony.jar (adcolony.jar) and jetified-sdk-4.1.3-runtime.jar (com.adcolony:sdk:4.1.3)
Duplicate class com.iab.omid.library.adcolony.walking.a.f found in modules jetified-adcolony.jar (adcolony.jar) and jetified-sdk-4.1.3-runtime.jar (com.adcolony:sdk:4.1.3)
Duplicate class com.iab.omid.library.adcolony.walking.b found in modules jetified-adcolony.jar (adcolony.jar) and jetified-sdk-4.1.3-runtime.jar (com.adcolony:sdk:4.1.3)
Duplicate class com.iab.omid.library.adcolony.walking.c found in modules jetified-adcolony.jar (adcolony.jar) and jetified-sdk-4.1.3-runtime.jar (com.adcolony:sdk:4.1.3)
Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 51s
Gradle task assembleDebug failed with exit code 1
我已经缩短了我的错误,但主要是与找到的重复类有关,我不知道如何在我的 build.gradle 中排除这么多类。请帮忙。