https://kotlinlang.org
Join Slack
Hi there, we are trying to update to kotlin 2.0.0 in our of our KMM project, and we are using the kt...
s

Suresh Maidaragi

over 1 year ago
Hi there, we are trying to update to kotlin 2.0.0 in our of our KMM project, and we are using the ktorfit-ksp dependency as shown in below SS1, We are seeing weird error while running the build both on iOS and Android plugin used
id("com.google.devtools.ksp") version "2.0.0-1.0.21"
dependency used
de.jensklingenberg.ktorfit:ktorfit-ksp:2.0.0-rc01
Can someone help to know why are seeing mutation of attributes is not allowed in our mobile builds, SS2 -> Android error log SS3 -> iOS error log
s
j
r
  • 3
  • 7
  • 384
If anyone is struggling to rename their shared module for iOS to start with an upper case letter for...
p

Paweł Kulikowski

over 2 years ago
If anyone is struggling to rename their shared module for iOS to start with an upper case letter for example
Shared
instead of
shared
by using a similar code:
val xcf = XCFramework()
listOf(
    iosX64(),
    iosArm64(),
    iosSimulatorArm64(),
).forEach {
    it.binaries.framework {
        this.baseName = "Shared"
        xcf.add(this)
    }
}
for some reason when releasing the XCFramework using
assembleXCFramework
action in gradle the framework for a simulator is still lowercased and does not work properly. I’ve found that by using
val xcf = XCFramework("Shared")
this issue can be fixed and all frameworks are renamed properly. Maybe there is something different happening underneath but this is the solution that worked for me. I hope it will help anyone. One additional think to mention is that then the assemble actions change their names to start with
assembleShared…
.
🙌🏾 1
🙌 4
p
z
  • 2
  • 1
  • 384
Hi everyone, I don’t know what happened but now whenever I create a KMM project from :android: studi...
d

Djuro

over 2 years ago
Hi everyone, I don’t know what happened but now whenever I create a KMM project from 🤖 studio in
common/build.gradle.kts
there is no
iosMain by creating
generated. Did anyone else face a similar issue?
d
j
  • 2
  • 3
  • 384
Hello, I want to load an image in jetpack compose, but the url redirects me to the image that's how ...
e

Elio Maroun

over 2 years ago
Hello, I want to load an image in jetpack compose, but the url redirects me to the image that's how the backend wants it, how can i achieve it using Coil library. So the url in the AsyncImage will redirect me to the image.
e
c
+2
  • 4
  • 18
  • 384
My Common KMM Folder does not have an xcode-frameworks folder. Iam not able to attach this to my iOS...
m

Meherdatta Chepuri

over 2 years ago
My Common KMM Folder does not have an xcode-frameworks folder. Iam not able to attach this to my iOS project. Any insights on why this might be happening?
m
p
k
  • 3
  • 45
  • 384
How do you get the fractional part of a double?
s

Sam Stone

over 3 years ago
How do you get the fractional part of a double?
s
g
  • 2
  • 7
  • 384
I installed the Timeout feature of the Ktor HttpClient, because I have some specific request that mi...
m

maxmello

over 5 years ago
I installed the Timeout feature of the Ktor HttpClient, because I have some specific request that might take a long time, so I installed the feature:
httpClient = HttpClient(CIO) {
        install(HttpTimeout) {
            requestTimeoutMillis = 60000
        }
        engine {
            maxConnectionsCount = 10000 
            endpoint.apply {
                maxConnectionsPerRoute = 1000 
                pipelineMaxSize = 100
                keepAliveTime = 5000 
                connectTimeout = 5000 
                connectRetryAttempts = 3
            }
        }
}
and in my request, I specifically overwrite the requestTimeout:
<http://httpClient.post|httpClient.post><MyResponse> {
                    url(myUrl)
                    contentType(ContentType.Application.Json)
                    timeout {
                        requestTimeoutMillis = TimeUnit.MINUTES.toMillis(30)
                    }
                    body = myBody
}
But I still got a coroutine
TimeoutCancellationException
after 15 seconds. I then specified the engine.endpoint.requestTimeout to be longer and the Exception went away - so am I not able to overwrite the CIO engines timeout with the Timeout feature? By the Timeout feature documentation, a
HttpRequestTimeoutException
should be thrown, not a Coroutine timeout exception, so it appears to get ignored. Can I overwrite the request timeout for CIO for a specific request? Or should I increase the CIO timeout a lot and then use the HttpTimeout feature to reduce it again?
m
e
j
  • 3
  • 3
  • 384
Any way to compare two lambdas to determine if they're equal (when they have been constructed separa...
b

Big Chungus

over 5 years ago
Any way to compare two lambdas to determine if they're equal (when they have been constructed separately with the same builder)
b
p
p
  • 3
  • 3
  • 384
Hi, its possible to have ads on a KMP project ? How would that be possible ?
m

Marc Planas

almost 2 years ago
Hi, its possible to have ads on a KMP project ? How would that be possible ?
➕ 1
m
j
+2
  • 4
  • 8
  • 383
After upgrading compose multiplatform to `1.8.0-alpha03` I am getting the following runtime error: ...
a

Altynbek Nurtaza

9 months ago
After upgrading compose multiplatform to
1.8.0-alpha03
I am getting the following runtime error:
Uncaught Kotlin exception: kotlin.native.internal.IrLinkageError: Can not read value from backing field of property 'androidx_lifecycle_viewmodel_compose_LocalViewModelStoreOwner$stable': Private backing field of property declared in module <org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-compose> can not be accessed in module <io.insert-koin:koin-compose-viewmodel>
is this an issue with koin?
a
e
  • 2
  • 2
  • 383
Previous177178179Next

kotlinlang

A modern programming language that makes developers happier.

Powered by