https://kotlinlang.org
Join Slack
I'm a bit confused... since when does `cancel()` throw a `JobCancellationException` to the calling t...
s

Stefan Oltmann

almost 4 years ago
I'm a bit confused... since when does
cancel()
throw a
JobCancellationException
to the calling thread?
kotlinx.coroutines.JobCancellationException: StandaloneCoroutine was cancelled; job="coroutine#2444":StandaloneCoroutine{Cancelling}@6b6879d8
	at kotlinx.coroutines.JobSupport.cancel(JobSupport.kt:1605)
	at kotlinx.coroutines.Job$DefaultImpls.cancel$default(Job.kt:189)
✅ 1
s
j
l
  • 3
  • 34
  • 539
I can’t find `ByteBuffer` in Kotlin MultiPlatform. Is there anything similar I can use?
d

Daniele B

about 4 years ago
I can’t find
ByteBuffer
in Kotlin MultiPlatform. Is there anything similar I can use?
d
p
  • 2
  • 2
  • 539
I’ve been having some issues updating to Ktor client 3 on Android. I keep getting this error, but if...
b

blakelee

about 1 year ago
I’ve been having some issues updating to Ktor client 3 on Android. I keep getting this error, but if I downgrade it, it works fine. I’ve tried clearing all of my gradle caches and rebuilding.
Caused by: java.lang.ClassNotFoundException: Didn't find class "io.ktor.client.plugins.contentnegotiation.ContentNegotiation"
Has anyone else been seeing this?
b
s
+2
  • 4
  • 8
  • 538
Running the “createDistributable” task fails on Windows with: ```Execution failed for task ':compose...
r

rob42

almost 2 years ago
Running the “createDistributable” task fails on Windows with:
Execution failed for task ':composeApp:checkRuntime'.
> Failed to check JDK distribution: 'jpackage.exe' is missing
  JDK distribution path: C:\Program Files\Android\Android Studio\jbr
I’m using from IntelliJ (CE), not Android Studio. Any idea how I can fix this? I don’t see this JDK anywhere in project settings, where I have it set to Adoptium 21.
r
a
  • 2
  • 2
  • 538
We can pass data from a composable to its parent Layout with ParentDataModifier, so this data can be...
p

Patrick Steiger

about 2 years ago
We can pass data from a composable to its parent Layout with ParentDataModifier, so this data can be accessed from the measurable. But how to pass this same data from this layout to its parent layout?
p
p
+4
  • 6
  • 24
  • 538
Hi all, Is it possible to change the mouse cursor within a `ClickableText`? I followed the guidelin...
o

Olivier Patry

over 2 years ago
Hi all, Is it possible to change the mouse cursor within a
ClickableText
? I followed the guidelines to achieve clickable links with the help of annotated strings but the click affordance isn't as it could.
o
e
  • 2
  • 9
  • 538
Using Compose Navigation library, I am trying to override `onBackPressed` to not let the user exit t...
y

YASAN

over 4 years ago
Using Compose Navigation library, I am trying to override
onBackPressed
to not let the user exit the app (its a launcher so that's the expected behavior). But I have not found a way to check if the current destination is the main/last destination or if back stack is empty so I dont call
super.onBackpressed
on that condition.
y
i
  • 2
  • 19
  • 538
how to clear a ByteArray? var aob = ByteArray(1024)
i

Ifvwm

over 5 years ago
how to clear a ByteArray? var aob = ByteArray(1024)
i
n
m
  • 3
  • 3
  • 538
Is there anyway for me to call the `copy` function on a generic type? I would like to change the ge...
j

jeggy

about 3 years ago
Is there anyway for me to call the
copy
function on a generic type? I would like to change the generic type of
T
to make sure that it's a
data class
. Or is this just impossible?
fun <T: Any> doCopy(dataObject: T): T {
    return dataObject.copy()
}
j
a
+2
  • 4
  • 8
  • 537
I am getting an exception related to `SaveableStateProvider` that says `java.lang.IllegalArgumentExc...
n

Noé Casas

over 4 years ago
I am getting an exception related to
SaveableStateProvider
that says
java.lang.IllegalArgumentException: Type of the key XXXX is not supported. On Android you can only use types which can be stored inside the Bundle.
. What does it mean that a type can be stored inside the Bundle? Here,
XXXX
is a mere sealed class, nothing exotic.
n
i
+2
  • 4
  • 7
  • 537
Previous117118119Next

kotlinlang

A modern programming language that makes developers happier.

Powered by