How each Compose dependency affects the Compose project
Solution 1:
jetpack compose level:
material(Button,Text,...) -> foundation(Column,Image,...) -> animation(Animatable,animateXXAsState,...) -> ui(Alignment,Modifier,...) -> runtime(remember,State,...)
Therefore, the content of the advanced package you refer to will contain subordinate content. For example, the material you refer to will contain foundation, animation, UI and runtime, so you only need to refer to the material, if your project does not intend to use the material style, you only need to import the foundation
compose compiler layer is actually kotlin compiler plugin,You don't need to introduce dependencies
composeOptions {
kotlinCompilerExtensionVersion compose_version
kotlinCompilerVersion kotlin_version
}
please try
val compose = listOf(
"androidx.compose.ui:ui-tooling:${Versions.Compose.Master}",
"androidx.compose.material:material:${Versions.Compose.Master}",
"androidx.activity:activity-compose:${Versions.Compose.Activity}",
"androidx.compose.runtime:runtime-livedata:${Versions.Compose.Master}",
"androidx.lifecycle:lifecycle-viewmodel-compose:${Versions.Compose.Lifecycle}"
)
composeOptions {
kotlinCompilerExtensionVersion compose_version
kotlinCompilerVersion kotlin_version
}