Tony N
11/08/2024, 6:46 PMTony N
11/08/2024, 7:10 PMjava.lang.NoClassDefFoundError: Failed resolution of: Landroidx/compose/ui/platform/ComposeView;
at androidx.activity.compose.ComponentActivityKt.setContent(ComponentActivity.kt:55)
at androidx.activity.compose.ComponentActivityKt.setContent$default(ComponentActivity.kt:51)
at .TestingActivity.onCreate(TestingActivity.kt:15)
at android.app.Activity.performCreate(Activity.java:8305)
at android.app.Activity.performCreate(Activity.java:8284)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1417)
build.gradle
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("kotlin-parcelize")
id("org.jetbrains.kotlin.plugin.compose") version "2.0.20"
}
dependencies {
def composeBom = platform('androidx.compose:compose-bom:2024.10.01')
implementation composeBom
androidTestImplementation composeBom
implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.foundation:foundation'
implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'androidx.compose.runtime:runtime'
implementation 'androidx.activity:activity-compose'
debugImplementation 'androidx.compose.ui:ui-tooling'
}
Pablichjenkov
11/08/2024, 7:10 PMPablichjenkov
11/08/2024, 7:11 PMcompose-ui
dependencyPablichjenkov
11/08/2024, 7:12 PMruntime
, ui
, foundation
, material3
Tony N
11/08/2024, 7:21 PMandroidx.compose.material3:material3
would also contain compose-ui. But just tried adding implementation 'androidx.compose.ui:ui'
and still getting the error.
I have a couple other third party dependencies that may have compose coupled in there so maybe one of them have a different compose version. Ill try to see if that is the case. Thanks again!