没问题,使用了 material3 ,默认依赖项目如下
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
implementation 'androidx.activity:activity-compose:1.5.1'
implementation platform('androidx.compose:compose-bom:2022.10.00')
implementation 'androidx.compose.ui:ui'
implementation 'androidx.compose.ui:ui-graphics'
implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'androidx.compose.material3:material3'
好吧,随便放一个OutlinedTextField,居然提示:
This material API is experimental and is likely to change or to be removed in the future.
提示我需要增加注解@OptIn(ExperimentalMaterial3Api::class)消除警告。增加当然很简单,点一下鼠标就来了。
但是我想问的是,这是应该的么?大力推荐出来的material3,用一个最基本的组件,居然是体验性的?虽然我知道谷歌的尿性,但是这也太不可接受了吧。莫非我的版本使用有问题?