I'm trying to import import androidx.compose.ui.platform.DensityAmbient and I can't. the DensityAmbient is red, seems like the class doesn't exist. This is my gradle:
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.6.21"
implementation 'androidx.core:core-ktx:1.7.0'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.material:material-ripple:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.1'
implementation 'androidx.activity:activity-compose:1.4.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
}
does anyone have any idea (maybe version mismatch)?
CodePudding user response:
dont exist this class in this package
see the documentation:
https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/package-summary