https://kotlinlang.org
Join Slack
Is it possible to add a Swift package manager dependency to your Xcode project for KMP and then refe...
t

Trey

over 1 year ago
Is it possible to add a Swift package manager dependency to your Xcode project for KMP and then reference that code from Kotlin via an import? Similar to how you can import cocoapods.<some lib> or import platform.<lib>?
t
k
  • 2
  • 20
  • 849
When using Paging3 and a LazyColumn, I lose my scroll position upon phone rotation when my LazyColum...
z

Zun

about 3 years ago
When using Paging3 and a LazyColumn, I lose my scroll position upon phone rotation when my LazyColumn starts with an`item` before displaying my actual paging content Is there a proper fix for this? See thread for more info
z
t
i
  • 3
  • 7
  • 848
Hello all, I'm trying to run the tests, but it's giving the following error. ```Cannot inline byteco...
r

Rodrigo Silva

about 3 years ago
Hello all, I'm trying to run the tests, but it's giving the following error.
Cannot inline bytecode built with JVM target 17 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
my config
tasks {
    test { useJUnitPlatform() }
    compileKotlin { kotlinOptions.jvmTarget = "17" }
    ...
}
What am I doing wrong?
r
e
  • 2
  • 4
  • 847
Hi, can you show me an example of how to use zipOrAccumulate method using coroutines? Just basic acc...
m

Michal Patejko

over 2 years ago
Hi, can you show me an example of how to use zipOrAccumulate method using coroutines? Just basic accumulation of 2/3 eithers and returning lefts (or all lefts merged into single object) if there's any.
m
a
+2
  • 4
  • 10
  • 845
I would like to poke at pixels in a bitmap and draw it in compose. I have a canvas and try to draw a...
d

Draget

almost 3 years ago
I would like to poke at pixels in a bitmap and draw it in compose. I have a canvas and try to draw an image with 'drawImage(img)' with an ImageBitmap. But the ImageBitmap seems to be read-only…? Any other ways to draw single pixel in compose?
d
c
k
  • 3
  • 14
  • 844
Why is there `mutableStateListOf` and `mutableStateMapOf` but no `mutableStateSetOf` ?
j

julioromano

over 4 years ago
Why is there
mutableStateListOf
and 
mutableStateMapOf
but no
mutableStateSetOf
?
✅ 1
j
b
+2
  • 4
  • 6
  • 844
I have this error when opening the iOS project created with the Kotlin Multiplatform Wizard tool fro...
i

Iñaki Bes

11 months ago
I have this error when opening the iOS project created with the Kotlin Multiplatform Wizard tool from JetBrains:
No such module 'ComposeApp'
Does anyone know the reason? Steps I follow: • I download the KMP project as it is by default (Android and iOS with shared UI) from this URL: https://kmp.jetbrains.com/ • I unzip the project. • I run Android, and it works. • I run iOS from Android Studio, and it gives a build error. • I open the iOS project from Xcode, and in the
ContentView.swift
class, I get the error
"No such module 'ComposeApp'"
referring to the line
import ComposeApp
. A few days ago, I created a project using the same wizard, and I had no issues. I’ve compared both projects and found no differences. I can’t explain what’s happening. I’ve repeated the process several times, cleared the caches of both Android Studio and Xcode, restarted the computer, opened Xcode first and then Android Studio... but I can’t resolve it.
i
s
+3
  • 5
  • 7
  • 843
How to create ImageBitmap by array with points and colors? I have FloatArray every 3 items in it is ...
p

PHondogo

almost 3 years ago
How to create ImageBitmap by array with points and colors? I have FloatArray every 3 items in it is the point info (x, y, color). Need to make ImageBitmap from it.
p
c
+3
  • 5
  • 12
  • 842
I am facing this issue when i running the application to install my emulator
v

Vivek Modi

about 4 years ago
I am facing this issue when i running the application to install my emulator
v
k
  • 2
  • 10
  • 842
Hi, got an issue that I can’t figure out. I made a lib based on http4k that exposes a method that ca...
r

Razvan

over 4 years ago
Hi, got an issue that I can’t figure out. I made a lib based on http4k that exposes a method that calls a url using OkHttp client. When I use it from a http4k client app I have no problem, but I also tried to use it from a SpringBoot (kotlin) project and I get this error:
Companion
java.lang.NoSuchFieldError: Companion
	at org.http4k.client.OkHttpKt.requestBody(OkHttp.kt:75)
	at org.http4k.client.OkHttpKt.asOkHttp(OkHttp.kt:68)
	at org.http4k.client.OkHttpKt.access$asOkHttp(OkHttp.kt:1)
	at org.http4k.client.OkHttp$invoke$1.invoke(OkHttp.kt:38)
	at org.http4k.client.OkHttp$invoke$1.invoke(OkHttp.kt:35)
It’s the basic client, nothing fancy
OkHtttp()
if I replace that with JavaHttpClient() or ApacheClient() all works. Does that ring a bel or should try to make test projects to show it ? The error line is the if line in this function
private fun Request.requestBody() =
    if (permitsRequestBody(method.toString())) body.payload.array().toRequestBody()
    else null
r
d
  • 2
  • 9
  • 842
Previous616263Next

kotlinlang

A modern programming language that makes developers happier.

Powered by