在模块core-1.1.0-runtime.jar中找到重复的类android.support.v4.app.INotificationSideChannel

问题描述 投票:0回答:1

我该如何解决以下错误?

 1 exception was raised by workers:
  java.lang.RuntimeException: Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-26.1.0-runtime.jar (com.android.support:support-compat:26.1.0)
  Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-26.1.0-runtime.jar (com.android.support:support-compat:26.1.0)
  Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-26.1.0-runtime.jar (com.android.support:support-compat:26.1.0)
  Duplicate class android.support.v4.os.IResultReceiver found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-26.1.0-runtime.jar (com.android.support:support-compat:26.1.0)
  Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-26.1.0-runtime.jar (com.android.support:support-compat:26.1.0)
  Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-26.1.0-runtime.jar (com.android.support:support-compat:26.1.0)
  Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-26.1.0-runtime.jar (com.android.support:support-compat:26.1.0)
  Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-26.1.0-runtime.jar (com.android.support:support-compat:26.1.0)
  Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-26.1.0-runtime.jar (com.android.support:support-compat:26.1.0)
  Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.1.0-runtime.jar (androidx.core:core:1.1.0) and support-compat-26.1.0-runtime.jar (com.android.support:support-compat:26.1.0)

  Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.

等级配置:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 29

    defaultConfig {
        applicationId "com.example.postmaker"
        minSdkVersion 19
        targetSdkVersion 29
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }

    configurations.all {
        resolutionStrategy {
            force 'androidx.appcompat:appcompat:1.1.0'
        }
    }
}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation files('libs/photoeditor.jar')
    implementation files('libs/filtres/AutoLayout.jar')
    implementation 'com.facebook.android:audience-network-sdk:4.99.1'
    implementation 'com.google.android.material:material:1.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    androidTestImplementation 'androidx.test:core:1.2.0'
    implementation 'androidx.core:core-ktx:1.1.0'
    // AndroidJUnitRunner and JUnit Rules
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test:rules:1.2.0'
}
java android androidx
1个回答
0
投票

我为自己解决此问题hurraaaaaaaaaah!经过长时间的搜索,我通过写这样的书来获得解决方案,从Facebook受众网络中排除了com.android.support和support-v4组。

实现('com.facebook.android:audience-network-sdk:5.6.0'){排除组:“ com.android.support”排除模块:“ support-v4”}

© www.soinside.com 2019 - 2024. All rights reserved.