我有这样的 ImageView 设置
<ImageView
android:layout_width="0dp"
android:layout_height="@dimen/video_file_item_image_height"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="16:9"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
和
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
看起来像这样
但与
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
ImageView 不可见
更新
版本 2.0.3 它仍然没有修复,它只有在你没有设置 dp 的高度时才有效(例如你设置wrap_content了)并且app:layout_constraintEnd_toEndOf=也是必需的,但它的工作方式不同,我需要在 DPI 中设置高度!它在 2.0.1 中像这样工作,app:layout_constraintEnd_toEndOf=不需要设置

