:ladybug: CRASH I have an android native applicati...
# compose-android
a
🐞 CRASH I have an android native application where a recycler view has compose UI view holder. My application crashes with java.lang.AbstractMethodError: abstract method "boolean androidx.compose.ui.Modifier$Element.all(kotlin.jvm.functions.Function1)" at androidx.compose.ui.CombinedModifier.all(Modifier.kt:403) at androidx.compose.ui.CombinedModifier.all(Modifier.kt:403) Dependencies are as below: implementation 'androidx.activityactivity compose1.9.1' implementation 'androidx.fragmentfragment compose1.8.2' implementation 'androidx.constraintlayoutconstraintlayout compose1.0.1' implementation platform('androidx.composecompose bom2024.10.01') implementation 'androidx.compose.ui:ui' implementation 'androidx.compose.ui:ui-graphics' implementation 'androidx.compose.ui:ui-tooling-preview' implementation 'androidx.compose.material:material' implementation("androidx.compose.material3:material3") androidTestImplementation platform('androidx.composecompose bom2024.10.01') androidTestImplementation 'androidx.compose.ui:ui-test-junit4' debugImplementation 'androidx.compose.ui:ui-tooling' debugImplementation 'androidx.compose.ui:ui-test-manifest' implementation "androidx.compose.ui:ui-viewbinding" composeOptions { kotlinCompilerExtensionVersion '1.5.2' } Any idea?
🧵 4
I have figured out that one of my dependency is using
compileOnly 'androidx.compose.ui:ui:1.3.3'
which should be ok, because at runtime app module is providing
implementation 'androidx.compose.ui:ui'
which resolves to version
1.7.5
(latest) Strange thing is Gradle is not resolving compileOnly in debug mode. In release mode same code works fine.
For some unknown reasons, android docs says
Copy code
Note: You can't use the compileOnly configuration with Android Archive (AAR) dependencies.
Source: https://developer.android.com/build/dependencies#dependency_configurations