https://kotlinlang.org
Join Slack
Hello everyone! How to inject viewModel with Dagger 2 (not Hilt) into composable? Yes, i may inject ...
s

Sanendak

over 4 years ago
Hello everyone! How to inject viewModel with Dagger 2 (not Hilt) into composable? Yes, i may inject VM into Activity and send as parameter into composable function. But i don't like this method because what to do if i have many VM's? Earlier i inject VM's into fragments and this was fine.
s
j
l
  • 3
  • 5
  • 815
Is there a way to abort early (break) while using `fold` ? Or is a normal `for` loop the only option...
j

JP

about 5 years ago
Is there a way to abort early (break) while using
fold
? Or is a normal
for
loop the only option?
j
j
  • 2
  • 4
  • 815
Does one you already succeed to mock Build.VERSION.SDK_INT ?
a

Anthony f

over 6 years ago
Does one you already succeed to mock Build.VERSION.SDK_INT ?
a
t
  • 2
  • 5
  • 815
Hello guys, i triyng use androidx.compose.material:material-icons-extended:1.6.1 on compose multipl...
g

Guilherme Germano Silva

over 1 year ago
Hello guys, i triyng use androidx.compose.materialmaterial icons extended1.6.1 on compose multiplataform, but i facing this error
:composeApp:iosArm64Main: Could not resolve androidx.compose.material:material-icons-extended:1.6.1.
Someon can help me please?
g
j
s
  • 3
  • 10
  • 813
How can I build a .aar file for my Kotlin Multiplatform Mobile project that includes the commonMain ...
s

Sayali N

about 2 years ago
How can I build a .aar file for my Kotlin Multiplatform Mobile project that includes the commonMain code as well? I have a KMM app that I would like to render as a widget in existing android and iOS apps. I'm not sure how to get the binaries for android and iOS separately so that I can add those to my existing projects.
s
p
j
  • 3
  • 2
  • 812
When using Paging3 and a LazyColumn, I lose my scroll position upon phone rotation when my LazyColum...
z

Zun

over 2 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
  • 810
KotlinByteArray to/from NSData in iOS? I have been struggling for hours trying to make my MPP code w...
h

Henrik

over 5 years ago
KotlinByteArray to/from NSData in iOS? I have been struggling for hours trying to make my MPP code with with iOS regarding to NSData, and no examples I have found seems to work. I have a Kotlin function that takes a ByteArray as input, and another producing a ByteArray as output. This works perfectly in Java, mapping to byte[], but I have no idea how in iOS I can convert it to/from NSData that can be used in Swift. Any ideas?
h
a
  • 2
  • 6
  • 810
What logging solution do you use in your iOS/Android projects? I see that the examples use Napier, ...
s

Stefan Oltmann

almost 4 years ago
What logging solution do you use in your iOS/Android projects? I see that the examples use Napier, but there is no support for macOS and judging from the old opened issues the project seems currently unmaintained. Kermit looks like a good option, but is only a pre-release. So what do you recommend?
✅ 1
s
m
+3
  • 5
  • 90
  • 809
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

about 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
  • 809
Does kotlin native support embedded arm targets? I’m guessing the size of stdlib in kotlin would be ...
a

andrew

over 2 years ago
Does kotlin native support embedded arm targets? I’m guessing the size of stdlib in kotlin would be hefty
🚫 1
a
h
+4
  • 6
  • 19
  • 808
Previous555657Next

kotlinlang

A modern programming language that makes developers happier.

Powered by