Я много ищу, но ни один другой вопрос не отвечает на мою проблему.Проблема в том, что я получаю сообщение об ошибке при сборке моего проекта
Error:Execution failed for task ':transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/app/INotificationSideChannel$Stub$Proxy.class
Вот мой файл build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:multidex:1.0.1'
compile(name: 'GoogleAIDL', ext:'aar')
compile(name: 'GooglePlay', ext:'aar')
compile(name: 'androidx.arch.core.core-runtime-2.0.0', ext:'aar')
compile(name: 'androidx.asynclayoutinflater.asynclayoutinflater-1.0.0', ext:'aar')
compile(name: 'androidx.browser.browser-1.0.0', ext:'aar')
compile(name: 'androidx.coordinatorlayout.coordinatorlayout-1.0.0', ext:'aar')
compile(name: 'androidx.core.core-1.0.0', ext:'aar')
compile(name: 'androidx.cursoradapter.cursoradapter-1.0.0', ext:'aar')
compile(name: 'androidx.customview.customview-1.0.0', ext:'aar')
compile(name: 'androidx.documentfile.documentfile-1.0.0', ext:'aar')
compile(name: 'androidx.drawerlayout.drawerlayout-1.0.0', ext:'aar')
compile(name: 'androidx.fragment.fragment-1.0.0', ext:'aar')
compile(name: 'androidx.interpolator.interpolator-1.0.0', ext:'aar')
compile(name: 'androidx.legacy.legacy-support-core-ui-1.0.0', ext:'aar')
compile(name: 'androidx.legacy.legacy-support-core-utils-1.0.0', ext:'aar')
compile(name: 'androidx.lifecycle.lifecycle-livedata-2.0.0', ext:'aar')
compile(name: 'androidx.lifecycle.lifecycle-livedata-core-2.0.0', ext:'aar')
compile(name: 'androidx.lifecycle.lifecycle-runtime-2.0.0', ext:'aar')
compile(name: 'androidx.lifecycle.lifecycle-viewmodel-2.0.0', ext:'aar')
compile(name: 'androidx.loader.loader-1.0.0', ext:'aar')
compile(name: 'androidx.localbroadcastmanager.localbroadcastmanager-1.0.0', ext:'aar')
compile(name: 'androidx.print.print-1.0.0', ext:'aar')
compile(name: 'androidx.slidingpanelayout.slidingpanelayout-1.0.0', ext:'aar')
compile(name: 'androidx.swiperefreshlayout.swiperefreshlayout-1.0.0', ext:'aar')
compile(name: 'androidx.versionedparcelable.versionedparcelable-1.0.0', ext:'aar')
compile(name: 'androidx.viewpager.viewpager-1.0.0', ext:'aar')
compile(name: 'com.android.support.animated-vector-drawable-27.1.1', ext:'aar')
compile(name: 'com.android.support.appcompat-v7-27.1.1', ext:'aar')
compile(name: 'com.android.support.cardview-v7-27.1.1', ext:'aar')
compile(name: 'com.android.support.support-core-utils-27.1.1', ext:'aar')
compile(name: 'com.android.support.support-media-compat-27.1.1', ext:'aar')
//compile(name: 'com.android.support.support-v4-27.1.1', ext:'aar')
compile(name: 'com.android.support.support-vector-drawable-27.1.1', ext:'aar')
compile(name: 'com.google.android.gms.play-services-ads-18.0.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-ads-base-18.0.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-ads-identifier-17.0.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-ads-lite-18.0.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-base-17.0.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-basement-17.0.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-gass-18.0.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-measurement-17.0.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-measurement-api-17.0.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-measurement-base-17.0.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-measurement-impl-17.0.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-measurement-sdk-17.0.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-measurement-sdk-api-17.0.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-stats-17.0.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-tasks-17.0.0', ext:'aar')
compile(name: 'com.google.firebase.firebase-analytics-17.0.0', ext:'aar')
compile(name: 'com.google.firebase.firebase-analytics-unity-5.5.0', ext:'aar')
compile(name: 'com.google.firebase.firebase-app-unity-5.5.0', ext:'aar')
compile(name: 'com.google.firebase.firebase-common-18.0.0', ext:'aar')
compile(name: 'com.google.firebase.firebase-core-17.0.0', ext:'aar')
compile(name: 'com.google.firebase.firebase-iid-19.0.0', ext:'aar')
compile(name: 'com.google.firebase.firebase-iid-interop-17.0.0', ext:'aar')
compile(name: 'com.google.firebase.firebase-measurement-connector-18.0.0', ext:'aar')
compile(name: 'common', ext:'aar')
compile(name: 'facebook-android-wrapper-7.15.1', ext:'aar')
compile(name: 'facebook-applinks', ext:'aar')
compile(name: 'facebook-common', ext:'aar')
compile(name: 'facebook-core', ext:'aar')
compile(name: 'facebook-login', ext:'aar')
compile(name: 'facebook-marketing', ext:'aar')
compile(name: 'facebook-messenger', ext:'aar')
compile(name: 'facebook-places', ext:'aar')
compile(name: 'facebook-share', ext:'aar')
compile(name: 'installreferrer-1.0', ext:'aar')
compile project(':ChartboostSDK')
compile project(':Firebase')
compile project(':GoogleMobileAdsPlugin')
compile 'com.android.support:support-v4:23.0.0'
Я проверил наличие дублирующегося класса, и он показывает конфликт между этими двумя зависимостями.
com.android.support:support-v4-23.0.0
androidx.core.core-1.0.0
Проверьте здесь
Итак, решения, которые я уже попробовал:
добавьте этот код в build.gradle
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
all*.exclude group: 'com.android.support', module: 'support-annotations'
}
После добавления этого я могу успешно построить свой проект, но он запускается с ошибкой
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/ContextCompat
Я не понимаю, чего мне не хватает!