Can you update the Exoplayer dependency?


We are using a third party library that requires Exoplayer 2.6.0. But when we include that one then our build server fails. What Exoplayer do you require and is it possible to update the reference to the latest version of Exoplayer?

Warning: com.mopub.nativeads.NativeVideoController: can’t find referenced method ‘void addListener($EventListener)’ in program class


MoPub Android SDK versions 4.16+ will support ExoPlayer 2.4.4.
You can check the Android SDK changelog here.


We are using MoPub Android SDK 4.19.0 and one of our dependencies is using ExoPlayer 2.6.1 with the same error:

Warning: com.mopub.nativeads.NativeVideoController: can't find referenced method 'void addListener($EventListener)' in program class

The problem is MoPub supports an old version of ExoPlayer (2.4.4). For some reason, Google decided to deprecate the interface ExoPlayer.EventListener in 2.5.0, replaced it with Player.EventListener, and removed the method ExoPlayer.addListener(), so this line in is broken:

MoPub needs to update to ExoPlayer 2.5.0 or an earlier version AND fix mopub-sdk/mopub-sdk-native-video/src/main/java/com/mopub/nativeads/

Meanwhile, looks like excluding mopub-sdk-native-video allows to build the app:

    implementation('com.mopub:mopub-sdk:4.19.0@aar') {
        transitive = true;
        exclude module: 'mopub-sdk-native-video'


Hi @amaldona,
Thanks for the follow-up.
Could you please share with us the dependency that you are using that requires ExoPlayer 2.6.1? We will try to reproduce the issue and get back to you.