Gradle: Error: Program type already present: androidx.activity.R$attr : <p>When adding</p>

<pre><code> implementation 
    ('com.google.android.ads.consent:consent-library:1.0.0') {
        exclude module: 'androidx.activity'
    }
</code></pre>

<p>to my app/build.gradle file i get this error:
Error: Program type already present: androidx.activity.R$attr</p>

<p>What i did do:
1. gradlew androidDependencies
But i cannot find any duplicates</p>

<ol start="2">
<li><p>Read: <a href="https://developer.android.com/studio/build/dependencies#duplicate_classes" rel="noreferrer">https://developer.android.com/studio/build/dependencies#duplicate_classes</a>.</p></li>
<li><p>Other stackoverflow answers suggesting excluding support library versions dont help me</p></li>
</ol>

<pre><code>repositories {
    maven { url 'https://maven.fabric.io/public' }
}

configurations {
    all*.exclude group: 'com.google.guava', module: 'listenablefuture'
}

configurations.all {exclude group: 'com.android.support', module: 'support-v13'}

dependencies {
    def nav_version = "1.0.0"

    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'androidx.appcompat:appcompat:1.1.0-alpha05'
    implementation 'androidx.core:core-ktx:1.1.0-alpha05'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'


    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.2-alpha02'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha02'
    androidTestImplementation 'androidx.test.ext:junit:1.1.0'
    androidTestImplementation 'androidx.test:rules:1.1.1'
    androidTestImplementation 'androidx.test:core-ktx:1.1.0'

    implementation "com.vorlonsoft:androidrate:1.2.1"
    implementation 'com.github.THEAccess:SuspendRx:1.0.10'
    implementation 'com.github.THEAccess:privacydialog:0.1.0'
    implementation 'com.google.android.material:material:1.1.0-alpha04'
    implementation 'com.yqritc:android-scalablevideoview:1.0.4'
    implementation 'com.timqi.sectorprogressview:library:2.0.1'

    implementation 'com.github.Angtrim:Android-Five-Stars-Library:v3.1'
    implementation 'com.stepstone.apprating:app-rating:2.3.0'
    implementation 'com.google.firebase:firebase-dynamic-links:16.1.8'
    implementation 'com.google.firebase:firebase-ads:16.0.1'
    api ('com.google.android.ads.consent:consent-library:1.0.0') {
        exclude module: 'androidx.activity'
    }



    //Navigation
    implementation "android.arch.navigation:navigation-fragment-ktx:$nav_version"
    implementation "android.arch.navigation:navigation-ui-ktx:$nav_version"

    implementation 'io.reactivex.rxjava2:rxkotlin:2.3.0'
    //Kodein
    def kodein_version = "6.0.1"
    implementation "org.kodein.di:kodein-di-generic-jvm:$kodein_version"
    implementation "org.kodein.di:kodein-di-framework-android-x:$kodein_version"
    implementation "org.kodein.di:kodein-di-conf-jvm:$kodein_version"

    //Firebase
    implementation 'com.google.firebase:firebase-core:16.0.7'
    implementation 'com.google.firebase:firebase-config:16.4.0'
    implementation 'com.google.firebase:firebase-perf:16.2.4'
    implementation 'com.google.firebase:firebase-firestore:18.1.0'
    implementation 'com.google.firebase:firebase-auth:16.2.0'
    implementation 'com.google.firebase:firebase-inappmessaging-display:17.1.0'
    implementation('com.crashlytics.sdk.android:crashlytics:2.9.9@aar') {
        transitive = true;
    }
    implementation 'androidx.cardview:cardview:1.0.0'
}
</code></pre>

<p>Please help me understanding where the dependencies have duplicates</p>
