Hello, was wondering how I'd go about creating a m...
# multiplatform
u
Hello, was wondering how I'd go about creating a multiplatform project that targets android but also jvm for desktop. Basically sharing logic between android and desktop applications. I tried creating new jvm target with different name and came across some variant errors.
t
Why new jvm target? Jvm should work both for Jvm and also for Android.
If you need Android specific code, then you have
android
target
u
Yeah makes sense. I had tried creating android target instead of jvm target and I got this error
Extension with name 'android' does not exist. Currently registered extension names: [ext, kotlin, kotlinTestRegistry, defaultArtifacts, reporting, sourceSets, java
I looked online and seems to be because I dont have kotlin-android plugin but that won't work with multiplatform plugin afaik since it gives me
Cannot add extension with name 'kotlin', as there is an extension already registered with that name.
.