https://kotlinlang.org
Join Slack
What’s the best way to get the “current scope” for a suspend function? In other words, `suspend fun ...
s

sam

about 6 years ago
What’s the best way to get the “current scope” for a suspend function? In other words,
suspend fun foo() { async { ... } }
. I’d like to use async inside foo, and inherit from whatever scope foo was called with.
s
w
o
  • 3
  • 26
  • 1393
Hi, does anyone know how to solve "No such module composeApp" error
s

Saul

over 1 year ago
Hi, does anyone know how to solve "No such module composeApp" error
s
p
  • 2
  • 6
  • 1387
```Key "..." was already used. If you are using LazyColumn/Row please make sure you provide a unique...
z

Zoltan Demant

almost 3 years ago
Key "..." was already used. If you are using LazyColumn/Row please make sure you provide a unique key for each item.
For crashes like these, is there any work being done to improve the stack traces? I have a billion LazyColumn/Rows in my project, and while the error message explains the issue perfectly, I have zero insight into where it actually happens.
z
a
  • 2
  • 3
  • 1387
How can I align Text and content of OutlinedTextField to CenterVertically?
c

chanjungskim

over 2 years ago
How can I align Text and content of OutlinedTextField to CenterVertically?
c
e
  • 2
  • 7
  • 1376
Does anyone know why the Kotlin compiler does not work with JDK 20, even with the Maven extension in...
g

Gavin Ray

almost 3 years ago
Does anyone know why the Kotlin compiler does not work with JDK 20, even with the Maven extension instead of Gradle? 🤔
g
s
  • 2
  • 4
  • 1376
Has anyone tried measuring the size increase on a Compose multiplatform app? I built a one-screen sa...
j

Jacob Ras

about 2 years ago
Has anyone tried measuring the size increase on a Compose multiplatform app? I built a one-screen sample app that loads a list of cat pictures and shows them in a list. Clicking one enlarges it. I built it native (SwiftUI on iOS), KMP (Compose) and in Flutter to compare the three. On Android I'm seeing expected results (available in repo below). On iOS however, the size increase seems excessive. A thinned release build: native 1.7 MB, Compose: 24.8 MB, Flutter 48.1 MB. Debug build for simulator shows a similar ratio (4.6 / 57.6 / 91.8 MB). I don't think the Compose build is supposed to be that big, since I'm just using a couple of components. Please correct me if I'm wrong! 🙏 I have one guess: that the library isn't being stripped. I tried opening up the iOS archive without any luck (only binary files, didn't understand much of it 😬) All code + Android comparison results: https://github.com/jacobras/flutter-vs-native-vs-kmp Feel free to play around with it.
😮 2
👍 6
j
p
+4
  • 6
  • 13
  • 1372
My multiplatform backend project stopped compiling for the MacOS targets. Fails with ```e: Could not...
r

ribesg

over 2 years ago
My multiplatform backend project stopped compiling for the MacOS targets. Fails with
e: Could not find "org.jetbrains.kotlin.native.platform.CoreFoundationBase" in [/Users/ribesg/Projects/Inboxbooster-Mailer/HttpReceiver, /Users/ribesg/.konan/klib, /Users/ribesg/.konan/kotlin-native-prebuilt-macos-aarch64-1.7.22/klib/common, /Users/ribesg/.konan/kotlin-native-prebuilt-macos-aarch64-1.7.22/klib/platform/macos_arm64]
during
compileKotlinMacosArm64
and
compileKotlinMacosX64
. It worked before, it appeared when I added a dependency on
com.squareup.okio:okio:3.3.0
, but the problem is that I don't understand the error. It's open source so you can try for yourself here https://github.com/wizbii/Inboxbooster-Mailer/tree/feature/kotlin-receiver/HttpReceiver ✅ Was caused by Okio 3.3.0 being built for Kotlin 1.8 while I am using 1.7.22.
r
  • 1
  • 2
  • 1367
Is there a way to schedule a task in ktor? I want to sechedule a task for 20 minutes if they are ove...
i

IsaacMart

almost 3 years ago
Is there a way to schedule a task in ktor? I want to sechedule a task for 20 minutes if they are over, that task should be marked expired. Am having idea of using delay but not sure if its tye best approach so far.Any one please?
i
r
+3
  • 5
  • 20
  • 1367
I’m getting this after enabling K2 mode > Plugin ‘Kotlin Multiplatform’ wasn’t loaded because it’...
a

aidanvii

about 1 year ago
I’m getting this after enabling K2 mode
Plugin ‘Kotlin Multiplatform’ wasn’t loaded because it’s incompatible with the Kotlin plugin in K2 mode
a
t
+2
  • 4
  • 8
  • 1367
```w: Kotlin Multiplatform <-> Android Gradle Plugin compatibility issue: The applied Android Gradle...
j

Joel Denke

over 1 year ago
w: Kotlin Multiplatform <-> Android Gradle Plugin compatibility issue:
The applied Android Gradle Plugin version (8.3.0) is higher 
than the maximum known to the Kotlin Gradle Plugin.
Tooling stability in such configuration isn't tested, please report encountered issues to <https://kotl.in/issue>"

Minimum supported Android Gradle Plugin version: 7.0
Maximum tested Android Gradle Plugin version: 8.2

To suppress this message add 'kotlin.mpp.androidGradlePluginCompatibility.nowarn=true' to your gradle.properties
Really, how can it be that Kotlin plugin is not supporting version of AGP that is 8.3? I am using Kotlin 1.9.23, Gradle 8.6, AGP 8.3, Java 17.
j
g
+2
  • 4
  • 4
  • 1365
Previous212223Next

kotlinlang

A modern programming language that makes developers happier.

Powered by