Skip to content

Pin espresso-core 3.7.0 so Compose UI tests run on Android SDK 37 - #27

Merged
piercifani merged 1 commit into
mainfrom
pin-espresso-3.7.0
Nov 24, 2026
Merged

piercifani merged 1 commit into
mainfrom
pin-espresso-3.7.0

Conversation

@piercifani

Copy link
Copy Markdown
Contributor

Since 1.8.0 (compileSdk 36 → 37, Robolectric 4.16.1 → 4.18.1), Robolectric runs unit tests on SDK 37. Every Compose UI test in downstream modules then fails before it starts:

java.lang.NoSuchMethodException: android.hardware.input.InputManager.getInstance()
  at androidx.test.espresso.base.InputManagerEventInjectionStrategy.initialize

androidx.compose.ui:ui-test (BOM 2026.05.01, ui-test 1.11.2) pulls in espresso-core 3.5.0, which reflects on the hidden InputManager.getInstance(). That method is gone in SDK 37. espresso-core 3.7.0 calls Context.getSystemService(InputManager.class) on SDK 23+ instead. It's the release that pairs with the androidx-test 1.7.0 this module already pins.

This adds espresso-core 3.7.0 to testLibs and to the testImplementation / androidTestImplementation blocks that every Skip module inherits, so Gradle resolves it over the transitive 3.5.0.

Scheduled main builds of skip-ui and skip-fuse-ui have failed this way every day since 1.8.0 shipped on 2026-11-19.

🤖 Generated with Claude Code

Compose ui-test pulls in espresso-core 3.5.0, whose InputManagerEventInjectionStrategy
calls the hidden InputManager.getInstance(). That method no longer exists in Android
SDK 37, so since the compileSdk 36 -> 37 / Robolectric 4.18.1 bump every Robolectric
Compose UI test fails with NoSuchMethodException. espresso-core 3.7.0 uses
Context.getSystemService(InputManager.class) on SDK 23+.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@piercifani
piercifani merged commit f66c8cf into main Nov 24, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

1 participant