JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
16.33k stars 1.18k forks source link

Unresolved reference: OutlinedTextField (material3) #2176

Closed lucasmeneghin closed 2 months ago

lucasmeneghin commented 2 years ago

Looks like OutlinedTextField (and maybe more) is missing from material3 for android.

Project builds and run fine for desktop and web, fails for android.

Compose version: 1.2.0-alpha01-dev741 image

lucasmeneghin commented 2 years ago

Current workaround is to add api("androidx.compose.material3:material3:1.0.0-alpha14") to android source set Not sure if this could lead to problems with a release build, but should also be solvable by removing compose.material3 from the common source set and only applying to the other source sets

kavinchu commented 2 years ago

I still get this issue with implementation 'androidx.compose.material3:material3:1.0.0' I tried changing it to alpha14 but still same error. Where do I put the api(....)?

kavinchu commented 2 years ago

Figured it out need to add this annotation on the function @OptIn(ExperimentalMaterial3Api::class)

okushnikov commented 3 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

IjaasMohamed commented 2 weeks ago

even with the gradle change - implementation("androidx.compose.material3:material3:1.0.0-alpha14") its not working. is there a work around to solve this?

Having the annotation @OptIn(ExperimentalMaterial3Api::class) didn't work either

MatkovIvan commented 2 weeks ago

Multiplatform packages are org.jetbrains.androidx.* and usually available via plugin properties. Please refer to documentation instead of the outdated issue. 1.0.0-alpha is not the version you should use.

Since GitHub issues were closed with clear instructions to use YouTrack for follow-ups, so I'm going to lock this one