Can you update the Exoplayer dependency?


#1

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(com.google.android.exoplayer2.ExoPlayer$EventListener)’ in program class com.google.android.exoplayer2.ExoPlayer


#2

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


#3

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(com.google.android.exoplayer2.ExoPlayer$EventListener)' in program class com.google.android.exoplayer2.ExoPlayer

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 NativeVideoController.java 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/NativeVideoController.java

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'
    }

#4

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.
Thanks!