https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
j

Jeff

06/24/2020, 6:55 PM
Hey! I'm sure this is a simple question but I am unable to fix it. 😔 I imported a multiplatform project from GitHub using Intellij. Intellij doesn't automatically recognize the Gradle configuration. So I have to manually use the terminal for building the project, running the Android app e.t.c 🤔 Intellij handles other multiplatform projects well and I am able to run app and use the Gradle tasks in the window. Can someone help? 🙂
r

russhwolf

06/24/2020, 7:14 PM
A common cause of sync issues these days is that the kotlin version declared in gradle doesn't match the IDE plugin you have installed.
👌 2
j

John O'Reilly

06/24/2020, 7:18 PM
You'll likely run in to other issues with that project if you're not using Android Studio (and specifically alpha version) as it's using Jetpack Compose
j

Jeff

06/24/2020, 7:26 PM
Thanks @russhwolf. I just checked. The kotlin version in gradle is 1.3.72 and the Kotlin plugin version is 1.3.72 too.
@John O'Reilly! Such a fine project, thank you! I plan to use it as a template. It's quite helpful and unlike KaMPkit, you've got more platforms in there.
j

John O'Reilly

06/24/2020, 7:31 PM
Thanks @Jeff, it's hopefully useful for people at least exploring KMP for first time (and if looking in to using Jetpack Compose in such a project).....would definitely recommend KaMPkit for any exploration beyond that....KaMPkit has a lot more functionality and takes for example more robust approach to error checking etc
j

Jeff

06/24/2020, 7:33 PM
Why do you specify Android Studio v4.2 though? I've had trouble with 4.2 canary 2. I think it's conflicting with my 4.1 configuration. But let me keep trying.
j

John O'Reilly

06/24/2020, 7:34 PM
Jetpack Compose needs canary version
a

andylamax

06/24/2020, 10:19 PM
IDEA 2020 and all its inherited version have a bug with resolving KMP projects. I reverted back to IntelliJ 2019 and Android Studio 4.1 Canary 8. It works fine
j

Jeff

06/25/2020, 8:42 AM
Thank you @russhwolf, @John O'Reilly. I used Android Studion 4.2 Canary 2 and it works like a charm! I plan to make use of PeopleInSpace, KaMPkit and JetNews to make something incredible. 🙂
I get this error running the web app. What could be the issue? Android and server work fine. @John O'Reilly
Copy code
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':kotlinNpmInstall'.
> org.jetbrains.kotlin.gradle.targets.js.npm.KotlinNpmResolutionManager$ResolutionState$Installed cannot be cast to org.jetbrains.kotlin.gradle.targets.js.npm.KotlinNpmResolutionManager$ResolutionState$Configuring
j

John O'Reilly

06/26/2020, 8:02 AM
hmm, not sure off top of my head....will see if I can grab some time this weekend and take a look
3 Views