Mopub issue with proguard - NativeVideoController




I am having an issue with mopub and proguard on android. For some reason it is giving me the following issue:

Warning: com.mopub.nativeads.NativeVideoController: can’t find referenced method ‘MediaCodecVideoTrackRenderer(,int,long,android.os.Handler,$EventListener,int)’ in program class
Warning: com.mopub.nativeads.NativeVideoController: can’t find referenced method ‘MediaCodecAudioTrackRenderer(’ in program class

Can anyone please point me in the right direction as to what I would need to add to proguard to remove this warning?


After some more investigation I don’t think the issue is proguard.

I am using the following:

compile(‘com.mopub:mopub-sdk:4.4.1@aar’) {
transitive = true
compile '’
compile ‘’

Also please take note that my app is a radio streaming app and I am using ExoPlayer was the audio player.
I am using v1.5.6 of the ExoPlayer. It seems that the same version of ExoPlayer is also being used by the MoPub sdk. Which is good :slight_smile:

If you look closely though the Warning says the following:

com.mopub.nativeads.NativeVideoController: can’t find referenced method ‘MediaCodecVideoTrackRenderer(,int,long,android.os.Handler,$EventListener,int)’

There is no constructor that looks like this. The MoPub NativeVideoController is referencing this method, but it does not exist. If I navigate to the NativeVideoController class at line 420 there is the following:

mVideoTrackRenderer = new MediaCodecVideoTrackRenderer(
0, mHandler, null, 10);

Android Studio is showing an error saying that that constructor does not exist. All the constructors in the MediaCodecVideoTrackRenderer take Context as the first parameter. I don’t actually know how this code was compiled because it is a compile time error.

On another note, the line right after that:

mAudioTrackRenderer = new MediaCodecAudioTrackRenderer(sampleSource);

The same issue is prevalent here. MediaCodecAudioTrackRenderer has to take Context as the first parameter.

If I am barking up the wrong tree and there is no issue here please let me know what I have been doing wrong, but this really does not make any sense to me.


Hey, I am facing the same issue. Please help to resolve this.


Hi @richardkuiper and @sakshamkeshri,

Thanks for reaching out about this! We updated support from Exoplayer 1.4.2 to 1.5.6 in MoPub SDK version 4.5.1. Can you try updating to the latest version of the MoPub SDK to see if that resolves the issue?

If you continue to have trouble, please feel free to reach out to our Support Team at with the details of your issue and someone on the team will be able to help you troubleshoot this further.