Задача: app: mergeExtDexDebug не компилируется с помощью компилятора комнаты Капта, не зная, почему многие ответы здесь приводятся, но все они не могут исправить эту ошибку ......? - PullRequest
0 голосов
/ 01 мая 2020

Поэтому, когда я добавляю компилятор комнаты, приложение не будет собираться, а когда я его удаляю, оно делает, но, очевидно, мне это нужно, поэтому я go отсюда в руках этих выделенных и подкованных взглядов на Stackoverflow.

Приложение Gradle Module.

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



android {
    compileSdkVersion 29
    buildToolsVersion "29.0.3"

    defaultConfig {
        applicationId "com.coroutinesapp"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

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

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }


}

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


    implementation "androidx.recyclerview:recyclerview:1.1.0"
    implementation 'com.github.bumptech.glide:glide:4.11.0'
    implementation 'com.squareup.retrofit2:retrofit:2.7.1'
    implementation 'com.squareup.retrofit2:converter-gson:2.7.1'
    implementation 'android.arch.lifecycle:extensions:1.1.1'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
    implementation "androidx.room:room-runtime:2.2.5"
    kapt "androidx.room:room-compiler:2.2.5"
    implementation "androidx.room:room-ktx:2.2.5"

    // Testing
    testImplementation 'junit:junit:4.12'
    testImplementation "org.mockito:mockito-core:3.3.3"
    testImplementation 'androidx.arch.core:core-testing:2.1.0'
    testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.4'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

} 

Приложение Gradle

buildscript {
    ext.kotlin_version = '1.3.61'
    repositories {
        google()
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Все еще заставляет задуматься, почему именно это происходит, потому что урок, который я буквально копирую и вставляю 6 или 7 раз, и у них, очевидно, есть приложение, работающее со своим gradle, которое идентично моему.

, что наводит меня на мысль, что это может быть что-то более глубокое, возможно, похоже на мою Android Studio setup et c ..

Любая помощь с благодарностью.

Спасибо

...