https://kotlinlang.org
Join Slack
Hello all. I was wondering if anyone knows about this error: `java.net.ConnectException: Failed to c...
m

Malachi Holden

about 3 years ago
Hello all. I was wondering if anyone knows about this error:
java.net.ConnectException: Failed to connect to localhost/127.0.0.1:8080
I have a ktor server and an android app running on the same multiplatform project. Google doesn't say anything about the error except for this https://stackoverflow.com/questions/62500669/ktor-android-local-http-server-throws-error. I tried the solution and got nothing
m
a
m
  • 3
  • 5
  • 817
I’m wondering what I’m doing wrong when it comes to caching Gradle state between CI builds. Here’s a...
p

Piotr Krzemiński

over 2 years ago
I’m wondering what I’m doing wrong when it comes to caching Gradle state between CI builds. Here’s an example: after making this change that doesn’t change any source code, still a full Gradle build occurred (see here). Since I use gradle-build-action, it states in its README that it does some caching. For the mentioned commit, I’d expect Gradle to complete within several seconds, inferring that no source code was changed (
UP-TO-DATE
). Any clues?
✅ 1
p
a
+3
  • 5
  • 76
  • 815
does someone know how I can debug this error when building in a docker container (works natively) st...
c

Carl Benson

over 2 years ago
does someone know how I can debug this error when building in a docker container (works natively) stacktrace in 🧵
c
a
  • 2
  • 5
  • 814
I have a pre packaged SQL database. Which has couple of Boolean fields. When I import that DB using...
p

pollux-

about 5 years ago
I have a pre packaged SQL database. Which has couple of Boolean fields. When I import that DB using Room it's throwing an error staying Pre packaged database has invalid schema I'm guessing problem is that, DB has boolen field type but Room table we can't have Boolean its being used and Integer field. How can I solve this?? Thanks
p
m
  • 2
  • 5
  • 814
Migrating `AlertDialogBuilder` to compose. I have a multi-module application which I would like to m...
m

Mark

almost 3 years ago
Migrating
AlertDialogBuilder
to compose. I have a multi-module application which I would like to migrate slowly to Compose. In the existing code, one module has a function that takes a
Context
and shows a dialog. This function is called from another module (not app module). I can declare the
AlertDialog
composable, but am lost (sorry, I’m a newbie in Compose) as to how to call this from non-composable code. The only examples I see are using
setContent { … }
(or declaring
ComposeView
in existing content XML) neither of which are really applicable here. Any pointers please?
m
r
t
  • 3
  • 20
  • 813
Hi! After upgrading android studio to ladybug 2024.2.1, I get the following error in my project Inco...
j

jean

about 1 year ago
Hi! After upgrading android studio to ladybug 2024.2.1, I get the following error in my project > Inconsistent JVM-target compatibility detected for tasks ‘compileMyAppReleaseJavaWithJavac’ (17) and ‘kspMyAppReleaseKotlin’ (21). How can ksp use a different java version when I made sure all my modules are on Java 17 with this?
extensions.configure<JavaPluginExtension> {
    sourceCompatibility = JavaVersion.VERSION_17
    targetCompatibility = JavaVersion.VERSION_17
}
j
a
t
  • 3
  • 6
  • 812
Hi ! Is there any reliable way to create a zip from a folder ? I've seen 5 pages from StackOverflow ...
a

Ayfri

almost 3 years ago
Hi ! Is there any reliable way to create a zip from a folder ? I've seen 5 pages from StackOverflow and tried all the examples listed and I still come up with a zip that doesn't work with Minecraft because Minecraft is extremely strict with Zip files :/
a
j
+2
  • 4
  • 28
  • 812
Hello, I want to use Dokka in an open source multi-module, multiplatform and android project (all at...
l

louiscad

over 4 years ago
Hello, I want to use Dokka in an open source multi-module, multiplatform and android project (all at once), and my attempts at setting up Dokka have failed (outputs empty doc), plus I'm super confused and overwhelmed by the documentation of Dokka. Would someone that is familiar with Dokka setup join me for a pair-programming session where we get that setup working sometime tomorrow? I'm in CEST, but I have high flexibility. FYI, the project in question is #splitties.
l
j
+3
  • 5
  • 150
  • 812
I'm trying to use `sqldelight` in my kmp project with `desktop` + `mobile` and `wasmjs` targets shar...
h

hamyn

over 1 year ago
I'm trying to use
sqldelight
in my kmp project with
desktop
+
mobile
and
wasmjs
targets sharing UI and my project won't build⬇️, since
sqldelight
doesn't support wasm yet, how can I exclude the sqldelight requirement from wasm target only ? I will be using a different approach for persistence with wasm ui, but I haven't given much though to it yet.
h
h
  • 2
  • 3
  • 811
Does Compose multiplatform has interop to SwiftUI View somewhow? I found UIKitView interop, but was ...
j

Joel Denke

over 2 years ago
Does Compose multiplatform has interop to SwiftUI View somewhow? I found UIKitView interop, but was crazy ugly convert SwiftUi to that interop view:
struct MainScreen<Content>: UIViewControllerRepresentable where Content : View {

    var view: Content
    init(content: () -> Content) {
        view = content()
    }

    func makeUIViewController(context: Context) -> some UIViewController {
        let size = CGSize(width: 400, height: 400)
        let sizeSubView = CGSize(width: 200, height: 200)

        let uiView = UIView(frame: CGRect(origin: .zero, size: size))
        uiView.backgroundColor = .systemBlue

        // this will be a container view for the Swift UI View
        let centerPointForSubView = CGRect(origin: CGPoint(x: 100, y: 100), size: sizeSubView)
        let uiViewSubView = UIView(frame: centerPointForSubView)
        uiViewSubView.backgroundColor = .white

        uiView.addSubview(uiViewSubView)
        let host = UIHostingController(rootView: view)
        let hostView = host.view!
        uiViewSubView.addSubview(hostView)
        return ScreenProvider.shared.createMainScreenController(uiView: hostView)
    }

    func updateUIViewController(_ uiViewController: UIViewControllerType, context: Context) {}
}
Would like to avoid this 😄
K 1
👍 1
j
l
d
  • 3
  • 11
  • 810
Previous656667Next

kotlinlang

A modern programming language that makes developers happier.

Powered by