Elye
Elye

Reputation: 60081

"Cannot find a parameter with this name: items" for Basic Jetpack Compose Codelab

In Jetpack Compose Basic Codelab Animation Section (using Jetpack Compose Beta 01)

https://developer.android.com/codelabs/jetpack-compose-basics?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fcompose%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fjetpack-compose-basics#6

If we copy and paste follow the code, there will be an error as shown below.

Cannot find a parameter with this name: items

enter image description here

What is missing?

Upvotes: 7

Views: 4799

Answers (3)

izmirlikezzap
izmirlikezzap

Reputation: 19

//lerp

implementation ("androidx.compose.ui:ui-util:1.5.4")

https://developer.android.com/reference/kotlin/androidx/compose/ui/util/package-summary.html

You should check documentation. By the way ı dont know which one is the latest version. ı just wrote 0.1.1 after that ide give me latest one 1.5.4 :)

Upvotes: 0

Richard Onslow Roper
Richard Onslow Roper

Reputation: 6817

You are missing an import. In your very screenshot, there is a link to action which will automatically import it for you. Try that.

Also, as a best practice, let code completion insert stuff for you as you type, since that will take care of adding the appropriate imports, hopefully.

Upvotes: 0

Elye
Elye

Reputation: 60081

Apparently, we need to include another import that is not in the code example

import androidx.compose.foundation.lazy.items

Adding that will then get that through.

Upvotes: 9

Related Questions