keo kawasaki
07/13/2025, 7:10 PMViewTreeLifecycleOwner not found
the log statement shows that this
is indeed the viewtree lifecycleowner
ps. this is my first time using kotlin and developing android apps, but not new to programmingBitter
07/14/2025, 10:42 AMGridCells.Adaptive(100.dp)
and I am runnin the app which has the screen width of 350.dp . The compiler would identify that I can draw 3 columns , and 50dp would be left over .
What would happen to the left over space ? I am unable to utilize the left over space evenly despite horizontalArrangement .
LazyVerticalGrid(
modifier = Modifier.fillMaxWidth().background(Color.Blue),
horizontalArrangement = Arrangement.SpaceBetween,
columns = GridCells.Adaptive(100.dp)
) {
items(items) { room ->
RoomItem(room)
}
}
@Composable
fun RoomItem(room: RoomView) {
Box(
Modifier
.fillMaxWidth() // Fills the width of the column
.height(120.dp) // Give it a fixed height for visual clarity
.background(Color.Green) // This is the column's actual area
.padding(4.dp), // Some padding for visual separation
contentAlignment = Alignment.Center
) {
Text(text = "Room: ${room.name}", color = Color.White) // Just a placeholder
}
}
The code above yields the result in the screenshot. All my items are stacked after each other and the remaining space just appears at the end .Nicolai
07/16/2025, 9:03 PMHorizontalPager
with beyondViewportPageCount = 0
, hosting 5 tabs. Each tab is backed by its own ViewModel
, as they require separate API calls to fetch different sets of data. Some tabs trigger multiple calls, and a few have refresh timers that periodically update their data.
Functionally, everything mostly works. However, after navigating into a tab, selecting an item, returning, and repeating this process a few times, I encounter a crash. The issue is that there’s no meaningful stack trace—just an abrupt crash, which makes it hard to trace the root cause.
I suspect this may be related to a memory issue—perhaps due to multiple ViewModels, background tasks, or improper cleanup when navigating in and out. I’ve attempted various optimizations, but I’m concerned I might be missing something fundamental, especially in the context of using HorizontalPager
with multiple dynamic ViewModels and background activity.
Any advice, debugging tips, or even things to watch out for in this setup would be greatly appreciated.
(Will add Logcat below in thread.)Reyst
07/21/2025, 10:39 AMval routeStatusFlow = coordinator.sharedState
.map { it.currentRoute }
.distinctUntilChanged()
.flatMapLatest {
if (it != null) {
combine(
tasksRepository.getTasksSummaryFlow(it.id, START_IDENT),
tasksRepository.getTasksSummaryFlow(it.id, END_IDENT),
) { start, end -> RouteStatusViewState(it.status, start, end) }
} else flowOf(RouteStatusViewState())
}
.stateIn(
scope = viewModelScope,
started = SharingStarted.WhileSubscribed(LIFECYCLE_TIMEOUT_MS),
initialValue = RouteStatusViewState(),
)
What an I doing wrong?David
07/22/2025, 12:10 PMwhen guards
to work in Android Studio w/o warnigns? I'm running kotlin 2.2.0
and using latest stable Android Studio, also tested latest Canary, but still get warning about it being an experimental feature:
The feature "when guards" is experimental and should be enabled explicitly. This can be done by supplying the compiler argument '-Xwhen-guards', but note that no stability guarantees are provided.
Building from command line and android studio works fine, however android studio still gives off warning. I have K2 mode enabled in Android Studio.Umit AYDIN
07/23/2025, 8:35 AMAleksandar Ilic
07/24/2025, 2:21 PMigor.wojda
07/28/2025, 7:45 AMK Merle
07/29/2025, 6:27 AMUpdate your target API level by 31 August 2025 to release updates to your app
We've detected that your app is targeting an old version of Android. To provide users with a safe and secure experience, Google Play requires all apps to meet target API level requirements.
From 31 August 2025, if your target API level is not within one year of the latest Android release, you won't be able to update your app.
calidion
07/30/2025, 3:17 AMursus
07/31/2025, 12:54 AMTask :app:l8DexDesugarLibRelease
Info: Unexpected error while reading io.ktor.client.plugins.api.HookHandler's kotlin.Metadata: element 'k' is missing.
Info: Unexpected error while reading kotlinx.coroutines.channels.BufferedChannelKt's kotlin.Metadata: element 'k' is missing.
.. milions of these
anyone seeing these in new AGP?Bernhard
07/31/2025, 11:30 AMSuneelDev
08/01/2025, 9:55 AMArun Sudharsan
08/02/2025, 7:04 PMkotlin.jvm.internal.Intrinsics
calls). These account for ~2% of our APK size.
• Solution: Added ProGuard -assumenosideeffects
rules to remove these internal assertion methods (checkNotNull
, checkParameterIsNotNull
, etc.).
• Effect: Functionality remains the same; only runtime safety checks are stripped out.
• Trade-offs (which we’re okay with):
◦ Crash stack traces may lose some detail
◦ Some Kotlin-generated safety information from Intrinsics.java
will be missing
Project context
• Codebase: ~97% Kotlin, ~3% Java (20+ files).
Concerns
• Kotlin → Kotlin calls: Should be safe since nullability contracts are enforced at compile time.
• Java → Kotlin calls: Potential risk, since a Kotlin method expecting non-null could be called with a nullable from Java.
Current approach
• We’re reviewing and testing all Java → Kotlin call sites.
• Running automation suite + manual QA for validation.
My questions
1. How safe is this approach in practice? Are there pitfalls we might be missing?
2. Is there a more automated / systematic way (beyond manual inspection + tests) to gain confidence that removing these null-safety checks won’t cause issues in production?
Would love to hear if anyone has tackled this before, or has suggestions for tooling / strategies to improve our conviction here. 🙏Can
08/04/2025, 9:55 AMTobias Preuss
08/07/2025, 9:59 PMActivity
(with supportActionBar
, no XML toolbar) and
its nested Fragment
(with the toolbar icons setup via MenuProvider
, onCreateMenu
, onMenuItemSelected
).
The actual content view is in Compose > Scaffold
but without a TopBar
!
I am trying to enable edge-to-edge and to extend the supportActionBar
to the statusBar. Is there an API?
I tried enableEdgeToEdge
, fitsSystemWindows
on the Toolbar style and via window.decorView
. No success though.Giang Vu Truong
08/08/2025, 2:51 AMyash rathor
08/09/2025, 8:15 PMyousef shaaban
08/10/2025, 9:19 AMSlackbot
08/10/2025, 1:17 PMMau NG
08/11/2025, 7:19 AMEugene Maksymenko
08/12/2025, 10:08 AMTanmay Shree
08/12/2025, 4:06 PMcontext
parameter in the data block in fcm request but unable to get it in the MainActivity when I click on the notification.Slackbot
08/13/2025, 10:06 PMCan
08/14/2025, 12:15 PMBarry Fawthrop
08/16/2025, 6:20 PMOliver.O
08/20/2025, 9:08 PMazeddine
08/22/2025, 1:53 PMprasanna
08/25/2025, 8:29 AM