From 31f870231a807815e4d8a8cd0699c949f542d0c5 Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Fri, 17 Apr 2026 14:37:56 +0200 Subject: [PATCH 1/2] fix(compose): pass clipBounds explicitly to avoid D8 desugaring mismatch --- .../src/main/java/io/sentry/android/replay/util/Nodes.kt | 4 +++- .../kotlin/io/sentry/compose/SentryComposeHelper.kt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sentry-android-replay/src/main/java/io/sentry/android/replay/util/Nodes.kt b/sentry-android-replay/src/main/java/io/sentry/android/replay/util/Nodes.kt index cd9e3dd208a..2882b2113b8 100644 --- a/sentry-android-replay/src/main/java/io/sentry/android/replay/util/Nodes.kt +++ b/sentry-android-replay/src/main/java/io/sentry/android/replay/util/Nodes.kt @@ -167,7 +167,9 @@ internal fun LayoutCoordinates.boundsInWindow(rootCoordinates: LayoutCoordinates val rootWidth = root.size.width.toFloat() val rootHeight = root.size.height.toFloat() - val bounds = root.localBoundingBoxOf(this) + // pass clipBounds explicitly to avoid the `localBoundingBoxOf$default` bridge that AGP 8.13's D8 + // desugars inconsistently on minSdk < 24 + val bounds = root.localBoundingBoxOf(this, true) val boundsLeft = bounds.left.fastCoerceIn(0f, rootWidth) val boundsTop = bounds.top.fastCoerceIn(0f, rootHeight) val boundsRight = bounds.right.fastCoerceIn(0f, rootWidth) diff --git a/sentry-compose/src/androidMain/kotlin/io/sentry/compose/SentryComposeHelper.kt b/sentry-compose/src/androidMain/kotlin/io/sentry/compose/SentryComposeHelper.kt index 1f93f758756..10d02103ba1 100644 --- a/sentry-compose/src/androidMain/kotlin/io/sentry/compose/SentryComposeHelper.kt +++ b/sentry-compose/src/androidMain/kotlin/io/sentry/compose/SentryComposeHelper.kt @@ -86,7 +86,9 @@ public fun LayoutCoordinates.boundsInWindow(rootCoordinates: LayoutCoordinates?) val rootWidth = root.size.width.toFloat() val rootHeight = root.size.height.toFloat() - val bounds = root.localBoundingBoxOf(this) + // pass clipBounds explicitly to avoid the `localBoundingBoxOf$default` bridge that AGP 8.13's D8 + // desugars inconsistently on minSdk < 24 + val bounds = root.localBoundingBoxOf(this, true) val boundsLeft = bounds.left.fastCoerceIn(0f, rootWidth) val boundsTop = bounds.top.fastCoerceIn(0f, rootHeight) val boundsRight = bounds.right.fastCoerceIn(0f, rootWidth) From 16b9fff774b0c29e737f2ea62075d09d2887ea22 Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Fri, 17 Apr 2026 14:39:10 +0200 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index af6310208c6..e35d3c96a0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Fixes + +- Fix `NoSuchMethodError` for `LayoutCoordinates.localBoundingBoxOf$default` on Compose touch dispatch with AGP 8.13 and `minSdk < 24` ([#5302](https://github.com/getsentry/sentry-java/pull/5302)) + ## 8.39.1 ### Fixes