exoplayer添加IMA依赖后playerview报错
Error in playerview after adding IMA dependency in exoplayer
我已经实现了 exoplayer 的 styledplayerview :-
<com.google.android.exoplayer2.ui.StyledPlayerView
android:id="@+id/player_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:resize_mode="fill"
app:played_color="#A40A2F"
app:scrubber_color="#A40A2F"
app:show_subtitle_button="true"
/>
但在添加 IMA 广告依赖项后 实施 'com.google.android.exoplayer:extension-ima:2.14.0'
,我收到以下错误:-
error: cannot access AdViewProvider
playerView.setControllerVisibilityListener(this);
^
class file for com.google.android.exoplayer2.source.ads.AdsLoader$AdViewProvider not found
刚刚添加了 2 个依赖项,即
implementation 'com.google.android.exoplayer:exoplayer-core:2.14.0'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.14.0'
我已经实现了 exoplayer 的 styledplayerview :-
<com.google.android.exoplayer2.ui.StyledPlayerView
android:id="@+id/player_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:resize_mode="fill"
app:played_color="#A40A2F"
app:scrubber_color="#A40A2F"
app:show_subtitle_button="true"
/>
但在添加 IMA 广告依赖项后 实施 'com.google.android.exoplayer:extension-ima:2.14.0'
,我收到以下错误:-
error: cannot access AdViewProvider
playerView.setControllerVisibilityListener(this);
^
class file for com.google.android.exoplayer2.source.ads.AdsLoader$AdViewProvider not found
刚刚添加了 2 个依赖项,即
implementation 'com.google.android.exoplayer:exoplayer-core:2.14.0'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.14.0'