I plan on using Appium 2.0 in conjunction with the espresso driver in order to be able to test a UI built with Jetpack Compose. The app starts fine when using UIAutomator2 driver. However when using the espresso driver the app briefly launches then crashes with the error below. My developer has made some changes to the app in the hope of fixing but to no avail. Has anybody experienced anything similar or have any idea what the issue could be?
[debug] [Espresso] [Instrumentation] Process crashed while executing startEspressoServer(io.appium.espressoserver.EspressoServerRunnerTest):
[debug] [Espresso] java.lang.NoSuchMethodError: No virtual method getSetViewConfiguration()Lkotlin/jvm/functions/Function2; in class Landroidx/compose/ui/node/ComposeUiNode$Companion; or its super classes (declaration of āandroidx.compose.ui.node.ComposeUiNode$Companionā appears in /data/app/io.appium.espressoserver.test-bvOHEnT8MR0fRd3J2_1Kpg==/base.apk)
[debug] [Espresso] at myapp.view.AJSComposeFragment$onCreateView$1$1$1$1$1$1.invoke(AJSComposeFragment.kt:138)
[debug] [Espresso] at myapp.view.AJSComposeFragment$onCreateView$1$1$1$1$1$1.invoke(AJSComposeFragment.kt:58)
[debug] [Espresso] at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
[debug] [Espresso] at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
[debug] [Espresso] at myapp.view.AJSThemeKt$AJSThemeSwitcher$2.invoke(AJSTheme.kt:152)
[debug] [Espresso] at myapp.view.AJSThemeKt$AJSThemeSwitcher$2.invoke(AJSTheme.kt:151)
[debug] [Espresso] at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
[debug] [Espresso] at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
[debug] [Espresso] at myapp.view.AJSThemeKt$AJSTheme$1$1.invoke(AJSTheme.kt:131)
[debug] [Espresso] at myapp.view.AJSThemeKt$AJSTheme$1$1.invoke(AJSTheme.kt:130)
[debug] [Espresso] at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
[debug] [Espresso] at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
[debug] [Espresso] at androidx.compose.material.MaterialTheme_androidKt.PlatformMaterialTheme(MaterialTheme.android.kt:23)
[debug] [Espresso] at androidx.compose.material.MaterialThemeKt$MaterialTheme$1$1.invoke(MaterialTheme.kt:82)
[debug] [Espresso] at androidx.compose.material.MaterialThemeKt$MaterialTheme$1$1.invoke(MaterialTheme.kt:81)
[debug] [Espresso] at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
[debug] [Espresso] at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
[debug] [Espresso] at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:215)
[debug] [Espresso] at androidx.compose.material.TextKt.ProvideTextStyle(Text.kt:265)
[debug] [Espresso] at androidx.compose.material.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:81)
[debug] [Espresso] at androidx.compose.material.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:80)
[debug] [Espresso] at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
[debug] [Espresso] at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
[debug] [Espresso] at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:215)
[debug] [Espresso] at androidx.compose.material.MaterialThemeKt.MaterialTheme(MaterialTheme.kt:72)