I am trying to follow the official google Jetpack compose tutorial on this url but Android studio have an issue resolving the modifier Height()
I am 100% sure that I have imported the correct dependencies as per the tutorial, however, this modifier is no where to be found. It is not deprecated as it is still references in the official docs here
fun NewsStory() {
val image = +imageResource(R.drawable.header)
Column(
modifier = Spacing(16.dp)
) {
Container(modifier = Height(180.dp) wraps Expanded) {
DrawImage(image)
}
HeightSpacer(16.dp)
Text("A day in Shark Fin Cove")
Text("Davenport, California")
Text("December 2018")
}
}
Am I missing something?
I assume you are using dev02
(because Google's documentation is not updated) dependency for ui-layout dependency, because Height() is added in dev03. Change your ui-layout dependency to dev03:
implementation 'androidx.ui:ui-layout:0.1.0-dev03'
It should work