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

oshai

02/10/2023, 7:04 AM
I am trying to setup android target for multiplatform project (androidMain) and get the following error:
Copy code
Could not generate a decorated class for type KotlinAndroidTarget
Is there any guide how to add such sourceSet?
p

Pablichjenkov

02/10/2023, 7:10 AM
o

oshai

02/10/2023, 7:16 AM
Are those multiplatform or just android?
p

Pablichjenkov

02/10/2023, 7:32 AM
Multiplatform. The non-experimental don't share compose-ui. The experimental ones do share compose-ui code
o

oshai

02/10/2023, 7:32 AM
Thanks! Will try that
p

Pablichjenkov

02/10/2023, 7:32 AM
No problem 👍🏻
s

Sebastian Sellmair [JB]

02/10/2023, 8:07 AM
This is a classloader isolation issue! Please ensure that you tell Gradle to load Kotlin Gradle Plugin and the Android Gradle Plugin together. My preferred approach for this is to load the plugins on the root project
Copy code
plugins {
    kotlin("multiplatform") apply false
    id("<http://com.android.xyz|com.android.xyz>") apply false
}
168 Views