Fixed
Status Update
Comments
ko...@dumps.app <ko...@dumps.app> #2
Thanks for the feedback. To help us troubleshoot this issue further, we will need more information. Please share detailed reproduction steps and as much as possible of the following information when it applies:
1. Gradle and Android Plugin Version (File -> Project Structure -> Project)
2. Build logs
3. idea.log file if the issue occurs from Android Studio (select Help > Show Log in Finder / Explorer)
4. Gradle profile if it is a performance issue as described inhttps://developer.android.com/studio/build/optimize-your-build#profile
For more information on what’s needed and how to obtain this information please read the guide athttps://developer.android.com/studio/report-bugs#build-bugs
1. Gradle and Android Plugin Version (File -> Project Structure -> Project)
2. Build logs
3. idea.log file if the issue occurs from Android Studio (select Help > Show Log in Finder / Explorer)
4. Gradle profile if it is a performance issue as described in
For more information on what’s needed and how to obtain this information please read the guide at
as...@google.com <as...@google.com>
as...@google.com <as...@google.com> #3
Gradle version: 8.7
Plugin: "8.5.0-beta01"
Is there a way to sending you logs without making them publicly available?
Plugin: "8.5.0-beta01"
Is there a way to sending you logs without making them publicly available?
ko...@dumps.app <ko...@dumps.app> #4
If you attach the logs to a comment you mark as restricted using the button next to the attachment, then it will only be visible to the immediate team that works on AGP
as...@google.com <as...@google.com> #5
redacted
as...@google.com <as...@google.com> #6
Now there's not even a Hierarchy under the project's name in the Gradle pane... just `loading...` and that's it.
Description
Jetpack Compose version: BOM 2025.03.00 stable Jetpack Compose component used: runtime, ui, foundation Android Studio Build: Meerkat | 2024.3.1 | AGP 8.9.0 Kotlin version: 2.1.20
Steps to Reproduce or Code Sample to Reproduce:
Upgrade from Kotlin
2.1.10
to2.1.20
(all other deps & tools stay the same)Code with this nesting structure is causing a runtime ClassCastException:
This seems very sensitive to refactoring:
state.doSomething(a)
to a local lambda, no crashdetectTapGestures { extractedLambda() }
key(a.id)
to a separate top-level composable, no crashkey(a.id)
intoForEachRecord
, no crashOtherComposable
with siblings, which have lambdas, no crashSome refactors that do not work:
->pointerInput {}
tapToActivate { state.doSomething(a) }
Based on my knowledge of lambda naming conventions, I was pretty sure
$1$2$3
was too high up the nesting to be the lambda forpointerInput
.Looking in Android Studio's Kotlin Bytecode viewer for this file, the lambda for
pointerInput
is...MyFunction$1$2$3$3$1
, which does implementFunction2
.The class named
...MyFunction$1$2$3
is lambda forForEachRecord
, implementsFunction4
.Using dexdump to see the implementation of the
ExternalSyntheticLambda0
, it looks like it's the desugared lambda{ state.doSomething(a) }
, it's constructed withstate
anda
types and implementsFunction1
(1 for unused parameter from detectTapGestures).So maybe this is an issue with r8 desugaring? Please redirect if so.
Stack trace (if applicable):