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
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: