kotlin-multiplatform Questions

4

I want to try out the Kotlin Multiplatform Mobile (KMM) in Android studio. I have installed the Plugin and when I try to add configuration for IOS, nothing shows up. I just have an IOS option but n...
Madelene asked 29/9, 2020 at 4:28

2

Solved

I've upgraded from Kotlin 1.7 to Kotlin 1.9 in my KMM project. though I have Gradle 7.6 AGP 7.4.2 After the upgrade lintAnalyzeDebug task reports error on every dependency: Module was compiled with...
Synaesthesia asked 14/7, 2023 at 17:44

4

I just want to see the output from a few simple println(...) in my Kotlin mulitplatform commonTest code. My build.gradle.kts looks a little like: import org.jetbrains.kotlin.gradle.plugin.mpp.Kotl...
Nichollenicholls asked 19/2, 2020 at 22:1

1

On JVM I can use the following: fun lineSeparatorLength(): Int = System.getProperty("line.separator").length Can someone show me how to implement the same for Native/Desktop and JS?
Windowlight asked 13/8 at 20:28

1

I have implemented the latest version of Room in my KMP project (roomCommon = "2.7.0-alpha06" ). The new version change the instantiation setup for a RoomDatabase in a KMP project https:/...

2

Solved

I use the kotlinx-datetime library to get and compare with the user's current date. I ran into a problem that: SomeInstant.toLocalDateTime(TimeZone.currentSystemDefault()).month.name Returns the n...
Prudery asked 5/11, 2023 at 15:8

5

Solved

Cannot locate tasks that match ':composeApp:compileJava' as task 'compileJava' is ambiguous in project ':composeApp'. Candidates are: 'compileDebugAndroidTestJavaWithJavac', 'compileDebugJavaWithJa...
Bamako asked 6/11, 2023 at 8:2

3

I have created fresh project(Hello World) in KMM followed by their official website. In android it works smooth but when I am trying to run in XCode it's giving errors because of which I am unable ...
Begird asked 9/2, 2021 at 5:24

3

Solved

I'm currently working on a project using Compose Multiplatform project, and looking for ways to handle image loading from a URL. However, since Coil isn't supported, I haven't found a solution. I'v...

3

Solved

To share a implementation of a protocol between an android and iOS app I am experimenting with Kotlin Multiplatform. I set up a basic multiplatform project as described here. It defines common cod...
Flatus asked 4/4, 2019 at 14:46

2

Solved

I am working on a multiplatform app in Kotlin on Android Studio and when I try to run the app to an iOS simulator, I get this error: The following build commands failed: PhaseScriptExecution [CP-U...
Landing asked 24/10, 2021 at 5:22

4

Solved

Is it possible at the moment to have a kotlin multiplatform project using compose for sharing the ui code for desktop, web, and mobile at the same time? All the examples i found only cover multipla...
Leech asked 8/2, 2022 at 22:33

1

Solved

Trying to integrate Jetpack ViewModel into KMP project. With the following configuration, desktop app cannot be compiled (error bellow). libs.versions.toml androidxLifecycle = "2.8.0" koi...

1

I have a requirement where I want to have different set of data to be shipped with the library generated by kotlin multiplatform module for different flavors like dev and prod. In an Android projec...
Holst asked 16/1, 2020 at 9:24

2

Solved

I'm trying out KMM for the first time and when I try to rebuild the project, I get this error. Not sure what this task does. Am I the only one getting this error? I'm using a Macbook Pro M1 that ru...
Dampproof asked 9/3 at 19:11

4

Solved

I have the following project structure root-project │ build.gradle.kts │ └───multiplatform-project │ │ build.gradle.kts │ │ │ └───src │ │ kotlin | | js │ └───simple-kotlin-project │ build.gradl...
Barsac asked 13/12, 2019 at 11:37

2

I am creating my first app on kotlin multi-platform, and a need to get some device's information like language and maybe country. I am looking for a way to get on both devices, android and iOS, usi...
Sentience asked 26/1, 2021 at 20:38

1

I want to change the status bar color. I have tried some code in App.kt file MaterialTheme{ } But it's not affect on statusbar color. I want to change the status bar color like the background of t...

1

I am trying to add another shared module in my KMP project. I chose File > New > New Module... The wizard that appears doesn't show the Kotlin Multiplatform Shared Module template 🤔 : I ha...
Sallysallyann asked 2/3 at 1:4

6

I created a default KMP project, and changed nothing. It runs fine on android, but when I try to run it on iOS it tells me that it cant find the gradle plugin: A problem occurred configuring root p...
Fixture asked 18/12, 2022 at 23:12

1

I am trying to read/write files in the commonMain module. I created a new Kotlin Multiplatform App for Android and iOS using the Android Studio Wizard. (New -> New Project ... -> Koltin Multi...
Elicia asked 13/1, 2023 at 10:21

6

Solved

I have followed the KMM hands-on tutorial on how to build a sample app with KMM and I was able to complete all the steps successfully! (Yu-huu!) Now I am trying to do a small POC in the production ...

1

how to check the internet availability in KMM (actual/expect) ANDROID actual class NetworkUtils actual constructor() { actual fun isNetworkAvailable(): Boolean { val connectivityManager = applic...
Harleyharli asked 29/4, 2023 at 11:0

3

Solved

I am taking my first look at Kotlin Multiplatform and am following the guide here https://kotlinlang.org/docs/multiplatform-mobile-upgrade-app.html I have my class @Serializable data class RocketLa...
Rattlesnake asked 19/4, 2023 at 9:46

3

I'm just trying to test a HelloWorld with KOtlin Multiplatform. I did it as described with the wizard. I can run the Android app and it works, but when I try to run the desktop main I get this erro...
Remonstrate asked 14/11, 2023 at 12:10

© 2022 - 2024 — McMap. All rights reserved.