Android ExoPlayerView中的wrap_内容存在问题。如果设置为包装内容,ExoPlayerView高度在运行时保持为0

Android ExoPlayerView中的wrap_内容存在问题。如果设置为包装内容,ExoPlayerView高度在运行时保持为0,android,android-layout,height,android-wrap-content,Android,Android Layout,Height,Android Wrap Content,我想让我的播放器适应视频的高度,所以我使用的是带有wrap_内容高度的Exo播放器视图。 但它不起作用 <com.google.android.exoplayer2.ui.PlayerView android:id="@+id/exoplayerview" android:layout_width="match_parent"

我想让我的播放器适应视频的高度,所以我使用的是带有wrap_内容高度的Exo播放器视图。 但它不起作用

<com.google.android.exoplayer2.ui.PlayerView                     
                        android:id="@+id/exoplayerview"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:resize_mode="fill"
                        app:use_controller="false">

                    </com.google.android.exoplayer2.ui.PlayerView>