Matti MK
08/18/2025, 10:32 AMSearchBar
component I get the following crash:
java.lang.NoSuchMethodError: No static method SearchBar-Y92LkZI(Lkotlin/jvm/functions/Function2;ZLkotlin/jvm/functions/Function1;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/graphics/Shape;Landroidx/compose/material3/SearchBarColors;FFLandroidx/compose/foundation/layout/WindowInsets;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V in class Landroi
I've got no issues with other M3 components I've tried. Running Compose BOM 2025.05.01
, nav3, M3 adaptive. I've tried to look for this in the IssueTracker, but no luck there.
Any suggestions?shikasd
08/18/2025, 2:45 PMMatti MK
08/18/2025, 4:59 PMFATAL EXCEPTION: main
Process: com.myprocess.debug, PID: 2298
java.lang.NoSuchMethodError: No static method SearchBar-Y92LkZI(Lkotlin/jvm/functions/Function2;ZLkotlin/jvm/functions/Function1;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/graphics/Shape;Landroidx/compose/material3/SearchBarColors;FFLandroidx/compose/foundation/layout/WindowInsets;Lkotlin/jvm/functions/Fun
at MyScreen(MyScreen.kt:52)
at MyScreen(MyScreen.kt:34)
at MyScreen$2$1.invoke(MyScreen.kt:82)
at MyScreen$MyScreen$2$1.invoke(MyScreen.kt:79)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:130)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke$lambda$0(ComposableLambda.kt:132)
at androidx.compose.runtime.internal.ComposableLambdaImpl.$r8$lambda$qz3voikrQeNn5XJEtUlXR2wfzBw(Unknown Source:0)
at androidx.compose.runtime.internal.ComposableLambdaImpl$$ExternalSyntheticLambda16.invoke(D8$$SyntheticClass:0)
at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:214)
at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2898)
at androidx.compose.runtime.ComposerImpl.skipToGroupEnd(Composer.kt:3282)
at androidx.compose.material3.adaptive.layout.PaneKt.AnimatedPane(Pane.kt:69)
at MyScreen$2.invoke(MyScreen.kt:77)
at MyScreen$2.invoke(MyScreen.kt:76)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:130)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke$lambda$0(ComposableLambda.kt:132)
at androidx.compose.runtime.internal.ComposableLambdaImpl.$r8$lambda$qz3voikrQeNn5XJEtUlXR2wfzBw(Unknown Source:0)
at androidx.compose.runtime.internal.ComposableLambdaImpl$$ExternalSyntheticLambda16.invoke(D8$$SyntheticClass:0)
at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:214)
at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2898)
at androidx.compose.runtime.ComposerImpl.skipToGroupEnd(Composer.kt:3282)
at androidx.compose.material3.adaptive.navigation.AndroidThreePaneScaffold_androidKt.NavigableListDetailPaneScaffold-E_5xQPI(AndroidThreePaneScaffold.android.kt:80)
at MyScreen.MyScreen(MyScreen.kt:42)
at MyScreen$1(Unknown Source:6)
at MyScreen.$r8$lambda$fyhSO73WQoJPRPwt5IKEwZMI86w(Unknown Source:0)
at MyScreen$$ExternalSyntheticLambda0.invoke(D8$$SyntheticClass:0)
at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:214)
at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2898)
at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:3224)
at androidx.compose.runtime.ComposerImpl.doCompose-aFTiNEg(Composer.kt:3820)
at androidx.compose.runtime.ComposerImpl.recompose-aFTiNEg$runtime_release(Composer.kt:3762)
at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:1014)
at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:1304)
at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:144)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2.invokeSuspend$lambda$22(Recomposer.kt:623)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2.$r8$lambda$OqADLCDYmRw1RgNUvn1CR0kX32M(Unknown Source:0)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$$ExternalSyntheticLambda0.invoke(D8$$SyntheticClass:0)
at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:39)
at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:108)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1749)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1760)
at android.view.Choreographer.doCallbacks(Choreographer.java:1216)
at android.view.Choreographer.doFrame(Choreographer.java:1132)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1707)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:342)
at android.app.ActivityThread.main(ActivityThread.java:9638)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@84109bf, androidx.compose.ui.platform.MotionDurationScaleImpl@d63888c, StandaloneCoroutine{Cancelling}@f43fbd5, AndroidUiDispatcher@26b4fea]
Matti MK
08/18/2025, 5:00 PMSNAPSHOT
deps for compose-runtime-saveable
but ended up with the above crash again 🤷shikasd
08/18/2025, 5:03 PMMatti MK
08/18/2025, 5:04 PMshikasd
08/18/2025, 5:16 PMMatti MK
08/18/2025, 6:04 PMMatti MK
08/19/2025, 6:17 AM2025.05.01
maps to material3
version 1.3.2
• material3-android\1.3.2\e0404061e34ecbf250e37af2f6a619574b2cc86e
file material3-release.aar
has:
/* renamed from: SearchBar-Y92LkZI, reason: not valid java name */
public static final void m1089SearchBarY92LkZI
The actual method signature looks like the one I'm calling, but just to be safe I also added all the optional params, still crashes.
So, confirming it's there I tried the following, but didn't help:
• Invalidated caches & restart
• Debug build (no R8/minimization/proguard)
I tried adding the sample SearchBar
to latest NIA (8092c60c
) and it works without issue. I copy pasted the exact same code to my project:
• Preview works (why...?)
• Running the app results in the same crash as above
I then tried setting up my project similarly to NIA:
• compose-bom-alpha
instead of stable with version 2025.02.00
This now works and doesn't crash, but it hardly makes sense to jump back to an old Compose BOM alpha mapping. Just switching compose-bom
to 2025.02.00
doesn't solve the issue.
Any suggestions on how to go forward with this?Matti MK
08/19/2025, 6:20 AM@OptIn(ExperimentalMaterial3Api::class)
@Composable
private fun CustomSearchBar() {
var text by rememberSaveable { mutableStateOf("") }
var expanded = false
SearchBar(
inputField = {
SearchBarDefaults.InputField(
query = text,
onQueryChange = { text = it },
onSearch = { expanded = false },
expanded = expanded,
onExpandedChange = { expanded = it },
placeholder = { Text("Hinted search text") },
)
},
expanded = expanded,
onExpandedChange = { expanded = it },
) {
Column(Modifier.verticalScroll(rememberScrollState())) {
repeat(4) { idx ->
val resultText = "Suggestion $idx"
ListItem(
headlineContent = { Text(resultText) },
supportingContent = { Text("Additional info") },
colors = ListItemDefaults.colors(containerColor = Color.Transparent),
modifier =
Modifier.clickable {
text = resultText
expanded = false
}
.fillMaxWidth()
.padding(horizontal = 16.dp, vertical = 4.dp)
)
}
}
}
LazyColumn(
contentPadding = PaddingValues(start = 16.dp, top = 72.dp, end = 16.dp, bottom = 16.dp),
verticalArrangement = Arrangement.spacedBy(8.dp),
modifier = Modifier.semantics { traversalIndex = 1f },
) {
val list = List(100) { "Text $it" }
items(count = list.size) {
Text(
text = list[it],
modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp),
)
}
}
}
Matti MK
08/19/2025, 6:44 AMmethod public static final SearchBar-Y92LkZI
in my classes.dex
but it's under SearchBarKt
not SearchBar_androidKt
.
I don't see the same *_androidKt
naming when looking at the other androix.compose.material3
classes that works as expected.Matti MK
08/19/2025, 7:26 AMandroidx-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "material3" }
And with that also added the material-icons-extended
.
That then fixed my issue, but I'd still prefer to use the BOM version. Is there somehting for me to do
I'd prefer to use the BOM version, though. Any tips on that?
E:
So, my issue is with Material3 1.3.2
. The Compose BOM still refers to that version as it's the most recent stable version. Using M3 1.4.0.-alpha/beta
versions fix my issue. So I guess M3 1.4.0
will be used in the Compose BOM once it's stable and then I can switch back.Matti MK
08/19/2025, 10:35 AMModalBottomSheet
in the app crashes:
FATAL EXCEPTION: main
Process: com.myapp.debug, PID: 26346
java.lang.UnsupportedOperationException: This function has a reified type parameter and thus can only be inlined at compilation time, not called directly.
at kotlin.jvm.internal.Intrinsics.throwUndefinedForReified(Intrinsics.java:209)
at kotlin.jvm.internal.Intrinsics.throwUndefinedForReified(Intrinsics.java:203)
at kotlin.jvm.internal.Intrinsics.needClassReification(Intrinsics.java:221)
at androidx.compose.runtime.saveable.RememberSaveableKt.rememberSaveable(RememberSaveable.kt:141)
at androidx.compose.material3.ModalBottomSheet_androidKt.ModalBottomSheetDialog-sW7UJKQ(ModalBottomSheet.android.kt:376)
at androidx.compose.material3.ModalBottomSheetKt.ModalBottomSheet-YbuCTN8(ModalBottomSheet.kt:170)
at com.myapp.ScreenContent(TransportListsScreen.kt:263)
at com.myapp.ScreenContent$lambda$43(Unknown Source:54)
at com.myapp.ScreenKt.$r8$lambda$s8l0_DP8klgp9qGNd426sH7F0ns(Unknown Source:0)
at com.myapp.ScreenKt$$ExternalSyntheticLambda10.invoke(D8$$SyntheticClass:0)
at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:214)
at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2898)
at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:3224)
at androidx.compose.runtime.ComposerImpl.doCompose-aFTiNEg(Composer.kt:3820)
at androidx.compose.runtime.ComposerImpl.recompose-aFTiNEg$runtime_release(Composer.kt:3762)
at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:1014)
at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:1304)
at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:144)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2.invokeSuspend$lambda$22(Recomposer.kt:623)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2.$r8$lambda$OqADLCDYmRw1RgNUvn1CR0kX32M(Unknown Source:0)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$$ExternalSyntheticLambda0.invoke(D8$$SyntheticClass:0)
at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:39)
at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:108)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1749)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1760)
at android.view.Choreographer.doCallbacks(Choreographer.java:1216)
at android.view.Choreographer.doFrame(Choreographer.java:1132)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1707)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:342)
at android.app.ActivityThread.main(ActivityThread.java:9638)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@5613a97, androidx.compose.ui.platform.MotionDurationScaleImpl@20a2484, StandaloneCoroutine{Cancelling}@789f46d, AndroidUiDispatcher@78478a2]
Any thoughts on what could be wrong here?Matti MK
08/19/2025, 10:55 AMruntime-saveable
• The above resulted in this one, again: https://issuetracker.google.com/issues/419049149
• I switched once more over to 1.10.0-SNAPSHOT
for the runtime-saveable
and everything works now
So, now I've dug myself into using a M3 beta version as well as a runtime-saveable
SNAPSHOT...shikasd
10/01/2025, 4:50 PMMatti MK
10/01/2025, 4:58 PM