https://kotlinlang.org
Join Slack
Folks is there anyone encounter following log: `Method boolean androidx.compose.runtime.snapshots....
m

miqbaldc

almost 3 years ago
Folks is there anyone encounter following log:
Method boolean androidx.compose.runtime.snapshots.SnapshotStateList.conditionalUpdate(kotlin.jvm.functions.Function1) failed lock verification and will run slower.
    Common causes for lock verification issues are non-optimized dex code
    and incorrect proguard optimizations.
m
  • 1
  • 2
  • 701
Is there any official way of caching the result of a `suspend` fun? I realize the generated continua...
e

Emil Kantis

over 4 years ago
Is there any official way of caching the result of a
suspend
fun? I realize the generated continuation might be creating issues with how the caching mechanism works..
e
n
  • 2
  • 3
  • 701
Anyone run into Proguard issues using Kotlinx-Serialization? Getting this error which is making me s...
s

Shan

about 6 years ago
Anyone run into Proguard issues using Kotlinx-Serialization? Getting this error which is making me suspicious it's either an issue with Proguard or R8 (or, a serialization issue, which I don't think is actually happening)
j.b.u: Can't locate argument-less serializer for class e.b.b.d.a (Kotlin reflection is not available). For generic classes, such as lists, please provide serializer explicitly.
s
d
p
  • 3
  • 3
  • 701
in a KMM project, how to set java17 on the shared module? i have the following ```kotlin { andro...
b

brabo-hi

over 2 years ago
in a KMM project, how to set java17 on the shared module? i have the following
kotlin {
    androidTarget {
        compilations.all {
            kotlinOptions {
                jvmTarget = "17"
            }
        }
    }
i am getting the following error
'compileDebugJavaWithJavac' task (current target is 1.8) and 'compileDebugKotlinAndroid' task (current target is 17) jvm target compatibility should be set to the same Java version.
b
j
+4
  • 6
  • 19
  • 700
Is having janky frames normal with Jetpack Compose? I build two test apps, one in Compose and one in...
a

Aaron Waller

about 3 years ago
Is having janky frames normal with Jetpack Compose? I build two test apps, one in Compose and one in XML with a TabLayout + HorizontalPager and a GridView with 3 Columns. I recorded the stacktrace of both apps and uploaded it to Perfetto. The one with many janky frames is jetpack compose. The lags appear while swiping through the HorizontalPager, scrolling through the LazyVerticalGrid is working fine. I think I either have to stop using HorizontalPager + LazyVerticalGrid or switch back to XML. Any ideas what could cause this many janky frames? Code is in Thread ->
a
r
+2
  • 4
  • 23
  • 700
I’m still struggling with displaying images from URL inside a `LazyColumn` with `coil` ```items(phot...
j

jean

over 3 years ago
I’m still struggling with displaying images from URL inside a
LazyColumn
with
coil
items(photos) { photo ->
    Card(
        modifier = Modifier.fillMaxWidth()
    ) {
        Column {
            Image(
                painter = rememberAsyncImagePainter(model = photo.url),
                contentDescription = "location image",
                contentScale = ContentScale.Crop,
                modifier = Modifier.fillMaxWidth()
                    .height(160.dp)
            )
            Text(
                text = photo.title,
                style = MaterialTheme.typography.h6,
                modifier = Modifier.padding(8.dp)
            )
            Text(
                text = "lat: ${photo.lat} / lon: ${photo.lon}",
                modifier = Modifier.padding(start = 8.dp, bottom = 16.dp)
            )
        }
    }
}
This is quite unstable, some picture loads and some doesn’t. Any idea what I’m doing wrong here?
j
f
+3
  • 5
  • 20
  • 700
Why are `androidx.compose.ui.util.fastAny` and `androidx.compose.ui.util.fastForEach` not available?
s

Stefan Oltmann

over 3 years ago
Why are
androidx.compose.ui.util.fastAny
and
androidx.compose.ui.util.fastForEach
not available?
✅ 1
s
r
m
  • 3
  • 4
  • 700
is there a `java.util.EnumSet` equivalent in Kotlin? If not (how) can I use it with a Kotlin `enum c...
h

horse_badorties

over 8 years ago
is there a
java.util.EnumSet
equivalent in Kotlin? If not (how) can I use it with a Kotlin
enum class
?
h
e
j
  • 3
  • 4
  • 700
Hello! I’m trying to apply ksp inside a convention plugin like: ```with(pluginManager) { apply("...
g

Guilherme Delgado

about 3 years ago
Hello! I’m trying to apply ksp inside a convention plugin like:
with(pluginManager) {
    apply("com.android.library")
    apply("com.google.devtools.ksp")
}
but it always fails saying it cant be found. If i add it like this (in the build.gradle):
plugins {
    alias(libs.plugins.ksp)
}
it works. Am i missing any syntax? I’ve tried also like this:
val catalog = extensions.getByType<VersionCatalogsExtension>().named("libs")
with(pluginManager) {
       apply("com.android.library")
       apply("com.google.devtools.ksp:${catalog.findVersion("gradleGoogleKsp").get()}")
}
But with no luck 🤔
g
v
  • 2
  • 6
  • 699
iOS build is failing with ```Reason: Task ':shared:kspKotlinIosSimulatorArm64' uses this output of t...
m

Marko Novakovic

over 2 years ago
iOS build is failing with
Reason: Task ':shared:kspKotlinIosSimulatorArm64' uses this output of task ':shared:generateMRcommonMain' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

Possible solutions:
      1. Declare task ':shared:generateMRiosSimulatorArm64Main' as an input of ':shared:kspKotlinIosSimulatorArm64'.
      2. Declare an explicit dependency on ':shared:generateMRiosSimulatorArm64Main' from ':shared:kspKotlinIosSimulatorArm64' using Task#dependsOn.
      3. Declare an explicit dependency on ':shared:generateMRiosSimulatorArm64Main' from ':shared:kspKotlinIosSimulatorArm64' using Task#mustRunAfter.
none of possible solutions works. any help on how to solve this?
m
m
+3
  • 5
  • 13
  • 698
Previous828384Next

kotlinlang

A modern programming language that makes developers happier.

Powered by