https://kotlinlang.org
Join Slack
Anyone else adding `@file:OptIn(ExperimentalForeignApi::class)` to hundreds of files because of <htt...
r

ribesg

about 2 years ago
Anyone else adding
@file:OptIn(ExperimentalForeignApi::class)
to hundreds of files because of https://kotlinlang.org/docs/whatsnew19.html#explicit-c-interoperability-stability-guarantees ? Fun times
r
f
+2
  • 4
  • 36
  • 397
How to show image in SwiftUi from an image resource in common module without Moko and without CMP
m

mohamed rejeb

about 2 years ago
How to show image in SwiftUi from an image resource in common module without Moko and without CMP
๐Ÿ‘ 1
m
j
n
  • 3
  • 9
  • 397
what's the correct way to show a toast triggered by the viewModel in compose?
l

Lucca Beurmann

about 4 years ago
what's the correct way to show a toast triggered by the viewModel in compose?
๐Ÿงต 3
โœ… 1
l
d
+3
  • 5
  • 14
  • 397
```java.lang.NoSuchMethodError: No interface method withRestorableState(Ljava/lang/Object;Lkotlin/jv...
c

carbaj0

almost 5 years ago
java.lang.NoSuchMethodError: No interface method withRestorableState(Ljava/lang/Object;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V in class Landroidx/compose/runtime/savedinstancestate/RestorableStateHolder; or its super classes (declaration of 'androidx.compose.runtime.savedinstancestate.RestorableStateHolder' appears in /data/app/com.acv.composeland-V85a_e5F918MbctysYPnqQ==/base.apk)
        at androidx.navigation.compose.NavHostKt.withRestorableState(NavHost.kt:143)
        at androidx.navigation.compose.NavHostKt.access$withRestorableState(Unknown Source:0)
        at androidx.navigation.compose.NavHostKt$NavHost$5.invoke(NavHost.kt:130)
        at androidx.navigation.compose.NavHostKt$NavHost$5.invoke(Unknown Source:10)
        at androidx.compose.runtime.internal.ComposableLambda.invoke(ComposableLambda.kt:146)
        at androidx.compose.runtime.internal.ComposableLambda.invoke(Unknown Source:10)
        at androidx.compose.runtime.AmbientKt.Providers(Ambient.kt:187)
        at androidx.navigation.compose.NavHostKt.NavHost(NavHost.kt:126)
        at androidx.navigation.compose.NavHostKt$NavHost$6.invoke(Unknown Source:8)
        at androidx.navigation.compose.NavHostKt$NavHost$6.invoke(Unknown Source:10)
        at androidx.compose.runtime.RecomposeScope.compose(Composer.kt:286)
c
j
  • 2
  • 9
  • 397
StateFlow does not emit an updated object value if a property of the object is changed, is this the ...
t

tjohnn

over 5 years ago
StateFlow does not emit an updated object value if a property of the object is changed, is this the intentional design? Example:
data class Count(var value: Int = 0)

private val count = MutableStateFlow(Count())

val newCount = count.value
newCount.value++ // no emission though value is updated
count.value = newCount // this does not emit either
๐Ÿ‘Œ 4
t
z
m
  • 3
  • 4
  • 397
Is there an easy way to remove/disable all detekt "formatting" rules? I use ktfmt for formatting and...
c

Colton Idle

over 2 years ago
Is there an easy way to remove/disable all detekt "formatting" rules? I use ktfmt for formatting and sometimes detekt and ktfmt trample each other.
c
b
a
  • 3
  • 5
  • 396
How do you convert `ByteArray` to and from `CFDataRef`? I found <this> for converting to/from `NSDat...
j

Jeff Lockhart

almost 5 years ago
How do you convert
ByteArray
to and from
CFDataRef
? I found this for converting to/from
NSData
, but having a hard time figuring out how to do something similar for
CFDataRef
. I need to create a
SecCertificateRef
, which Iโ€™m using
SecCertificateCreateWithData()
and
SecCertificateCopyData()
to create and get the data from.
j
  • 1
  • 3
  • 396
can i use Exoplayer for Desktop ?
y

youssef

almost 2 years ago
can i use Exoplayer for Desktop ?
y
m
+3
  • 5
  • 18
  • 395
mutableIntStateOf? Did I miss those being added somehow?
c

Colton Idle

over 2 years ago
mutableIntStateOf? Did I miss those being added somehow?
c
f
  • 2
  • 3
  • 395
How can we enable compose metrics and `@Stable` inference in multiplatform modules with android sou...
s

Saiedmomen

over 3 years ago
How can we enable compose metrics and
@Stable
inference in multiplatform modules with android soucesets? There are no composables in the module. I have tried adding the following to the
android
block but doesn't seem to work and metrics report isn't generated for the module I am following Chris Banes blogpost on the issue and reports are generated for the main app module
android {    
    ...
    buildFeatures {
        compose = true
    }
    composeOptions {
        kotlinCompilerExtensionVersion = libs.versions.compose.get()
    }
}
๐Ÿ‘€ 2
s
a
+3
  • 5
  • 12
  • 395
Previous170171172Next

kotlinlang

A modern programming language that makes developers happier.

Powered by