https://kotlinlang.org logo
#compose
Title
# compose
e

escodro

02/12/2021, 2:28 PM
Hello, everyone. Has anyone having problems with
./gradlew connectedAndroidTest
using compose-test? My application runs
./gradlew build
just fine, but my instrumented tests does not run. If I play them by Android Studio they work, but not via command line. The issues is
A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingTaskDelegate
Type androidx.core.animation.AnimatorKt$addListener$1 is defined multiple times
If I exclude the
core-ktx
from the compose-test dependencies, it starts failing other modules in loop. Could anyone help me please?
I was able to make it run by force removing all failing dependencies.
Copy code
androidTestImplementation(Deps.compose.uiTest) {
    exclude group: "androidx.core", module: "core-ktx"
    exclude group: "androidx.fragment", module: "fragment"
    exclude group: "androidx.customview", module: "customview"
    exclude group: "androidx.activity", module: "activity"
    exclude group: "androidx.lifecycle", module: "lifecycle-runtime"
}
androidTestImplementation(Deps.compose.junit4) {
    exclude group: "androidx.core", module: "core-ktx"
    exclude group: "androidx.fragment", module: "fragment"
    exclude group: "androidx.customview", module: "customview"
    exclude group: "androidx.activity", module: "activity"
    exclude group: "androidx.lifecycle", module: "lifecycle-runtime"
}