Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't interact with composable elements in Compose 1.4.3 #919

Open
mehdisatei opened this issue Sep 29, 2023 · 1 comment
Open

Can't interact with composable elements in Compose 1.4.3 #919

mehdisatei opened this issue Sep 29, 2023 · 1 comment

Comments

@mehdisatei
Copy link

mehdisatei commented Sep 29, 2023

Running Appium with following env

{
  "platformName": "Android",
  "appium:platformVersion": "13",
  "appium:deviceName": "R5CW815KM6B",
  "appium:automationName": "Espresso",
  "appium:app": "PATH",
  "appium:appPackage": "PACKAGE_NAME",
  "appium:appActivity": "ACTIVITY_NAME",
  "appium:noReset": true,
  "appium:allowTestPackages": true,
  "appium:espressoBuildConfig": "PATH_TO_CONFIG",
  "driver": "compose"
}

and my espressoBuildConfig looks like this

{
    "toolsVersions": {
        "kotlin": "1.8.21",
        "composeVersion": "1.4.3",
        "minsdk": 24,
        "compileSdk": 34,
        "sourceCompatibility": null,
        "targetCompatibility": null,
        "additionalAppDependencies": [
            "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.21",
            "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.3",
            "com.google.android.material:material:1.0.0",
            "androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1",
            "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1",
            "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1",
            "androidx.lifecycle:lifecycle-viewmodel:2.5.0",
            "androidx.compose.ui:ui:1.4.3"
        ]
    }
}

I'm forcing composeVersion 1.4.3 and minsdk 24 but still can't interact with a composable element. The error is:

java.lang.AbstractMethodError: abstract method "androidx.compose.ui.Modifier androidx.compose.ui.Modifier.then(androidx.compose.ui.Modifier)

It's probably due to a version mismatching but even forcing composeVersion to 1.4.3 (same as build.gradle) has not fixed the issue.

@KazuCocoa
Copy link
Member

Perhaps you could modify https://github.com/appium/appium-espresso-driver/blob/master/espresso-server/app/build.gradle.kts directly and run the build command by your own (outside appium) to explore necessary dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants