Hi, I’m trying out Compose for the first time. I g...
# compose
m
Hi, I’m trying out Compose for the first time. I got a little stuck on the first tutorial where I’m supposed to draw an image with
DrawImage
. But I cannot seem to import the
DrawImage
function. Do anyone know what I might be doing wrong?
This is where I am:
Copy code
@Composable
fun NewsStory() {
    val image = +imageResource(R.drawable.header)

    Column(
            modifier = Spacing(16.dp)
    ) {
        DrawImage(image)
        Text("A day in Shark Fin Cove")
        Text("Davenport, California")
        Text("December 2018")
    }
}
Solved it. The “Empty Compose Activity” template didn’t contain the
androidx.ui:ui-foundation
dependency, so I had to add it myself.
👍🏻 2
c
You would think with such a tiny tutorial they would find the time to fix this. I fell in that pothole too, a month ago.