Проблема при переносе библиотеки поддержки на androidx

Я только что начал новый проект и перенес его на AndroidX, а затем получаю сообщение об ошибке ниже. Я проверил некоторые решения, такие как resolvestrategy, над аннотациями и исключением пакета, но ни одно из них не сработало для меня.

Моя targetSdkVersion — 28, minSdkVersion — 16, buildToolsVersion 28.0.2 и версия androidX — 1.0.0.

The error is Program type already present: androidx.annotation.BoolRes

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'


android {
    compileSdkVersion rootProject.ext.targetSdkVersion

    defaultConfig {
        applicationId "com.package.mobil"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode rootProject.ext.versionCode
        versionName rootProject.ext.versionName
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true

        renderscriptTargetApi rootProject.ext.targetSdkVersion
        renderscriptSupportModeEnabled true

        vectorDrawables.useSupportLibrary = true
    }

    //TODO Signing Config

    buildTypes {
        debug {
            applicationIdSuffix ".debug"
            versionNameSuffix "-debug"
            testCoverageEnabled true
            signingConfig signingConfigs.debug
        }
        release {
            minifyEnabled false
            shrinkResources false
            zipAlignEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            //TODO Signing Config
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    androidExtensions {
        experimental = true
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    //MultiDex
    implementation 'androidx.multidex:multidex:2.0.0'
    androidTestImplementation 'androidx.multidex:multidex:2.0.0'
    androidTestImplementation 'androidx.multidex:multidex-instrumentation:2.0.0'

    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

    //AndroidX
    implementation "androidx.appcompat:appcompat:$rootProject.ext.androidX"
    implementation "androidx.annotation:annotation:$rootProject.ext.androidX"
    implementation "androidx.constraintlayout:constraintlayout:$rootProject.ext.androidXConstraintLayout"

}

person DiRiNoiD    schedule 30.09.2018    source источник
comment
renderscriptSupportModeEnabled true является причиной проблемы. Когда я удалил эту строку, сборка прошла успешно. Теперь проблема в том, как я могу использовать с renderscriptSupportModeEnabled?   -  person DiRiNoiD    schedule 30.09.2018