Local ExoPlayer build not working with mediation libraries

392 views
Skip to first unread message

Andrey Menscikov

unread,
Sep 30, 2019, 3:24:47 AM9/30/19
to Google Mobile Ads SDK Developers
Hello,

I use latest ExoPlayer 2.10.5 version. Installed it manually, because I need to use extension modules, which requires that ExoPlayer has to be installed locally.

The problem is that I can't use AdMob ads with MoPub & myTarget mediation libraries with ExoPlayer local build (I think all other mediation libraries won't work also). If I install ExoPlayer via Gradle, everything works fine.
Seems like all Google mediation libraries use old ExoPlayer version and conflicts with ExoPlayer if it is installed locally.

Could you please fix this problem? I can't use mediation libraries because of that, and I think a lot of people also.
Attached some screenshots.

Sincerely,
Andrejs
Screenshot 2019-09-30 at 10.23.17.png

Mobile Ads SDK Forum Advisor Prod

unread,
Sep 30, 2019, 6:13:12 AM9/30/19
to voki...@gmail.com, google-adm...@googlegroups.com
Hi Andrey,

Thank you for reaching out to us. 

I tried to import our MoPub Mediation Adapter by following this guide and ExoPlayer v2.10.5 locally on our sample app. However, I'm getting a different error instead. 
With this, could you please provide a project (or at least a test project) where the issue is reproducible so we could check it on our end as well? 
Kindly use the "Reply Privately to Author" option to share the details privately.

Regards,
Teejay Pimentel
Mobile Ads SDK Team

ref:_00D1U1174p._5001UKLT4G:ref

Andrey Menscikov

unread,
Sep 30, 2019, 7:28:16 AM9/30/19
to Google Mobile Ads SDK Developers
Hello,

Thank you very much for fast answer.
I will try to make a demo project today.

I can give more information:
MoPub mediation library uses these dependencies:

<orderEntry type="library" name="Gradle: com.google.android.exoplayer:exoplayer:2.9.5@aar" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.exoplayer:exoplayer-core:2.9.5@aar" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.exoplayer:exoplayer-dash:2.9.5@aar" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.exoplayer:exoplayer-hls:2.9.5@aar" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.exoplayer:exoplayer-smoothstreaming:2.9.5@aar" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.exoplayer:exoplayer-ui:2.9.5@aar" level="project" />

You can see it in projects "app.iml" file after you add MoPub or myTarget mediation library for example. This version is very old. New 2.10.5 version has new methods which are incompatible with old version, that's why this error occurs.

Sincerely,
Andrejs

Andrey Menscikov

unread,
Sep 30, 2019, 8:25:11 AM9/30/19
to Google Mobile Ads SDK Developers
myTarget mediation library uses ExoPlayer 2.8.1 version. Needs to be upgraded to 2.10.5.

Andrey Menscikov

unread,
Sep 30, 2019, 11:30:33 AM9/30/19
to Google Mobile Ads SDK Developers
Maybe there is a way to force use local ExoPlayer library? I see that mediation libraries just overrides my local ExoPlayer library.
If it would be possible to force use local library it would be great.

This doesn't work:

implementation('com.google.ads.mediation:mytarget:5.4.6.0') {
    exclude module: 'exoplayer'
}

Mobile Ads SDK Forum Advisor Prod

unread,
Oct 1, 2019, 2:15:24 AM10/1/19
to voki...@gmail.com, google-adm...@googlegroups.com
Hi Andrey,

Thank you for sharing your insights regarding this. However, it would be much appreciated if you could send a sample project (with the issue reproduced) to us via Reply privately to author. In the case where one is sent, we can then forward that sample project to the Engineering team, along with all the reports thus far, in order for them to deliver a more decisive resolution to this concern.

Mobile Ads SDK Forum Advisor Prod

unread,
Oct 1, 2019, 6:07:21 AM10/1/19
to voki...@gmail.com, google-adm...@googlegroups.com
Hi Andrey,

Thank you for providing the project file privately.

As per checking, I was able to reproduce the conflict issue on my end. It was indeed that the mediation adapter is using the old version of the ExoPlayer (2.9.5 for MoPub and 2.8 for myTarget). With this, I'll raise this to our Engineering team and get back to you the soonest they provide their feedback.

Mobile Ads SDK Forum Advisor Prod

unread,
Oct 2, 2019, 2:23:41 AM10/2/19
to voki...@gmail.com, google-adm...@googlegroups.com
Hi Andrey,

As per our Engineering team, the MoPub and MyTarget SDKs have dependencies, so we can't prevent them from depending on ExoPlayer. However, you have 2 options to solve this issue.
  • You may pull in the ExoPlayer via gradle. Gradle chooses the newest version by default, between pub's specification, MoPub, and MyTarget's dependent version.
  • Explicitly excludes all subdependencies of ExoPlayer from all other adapters, in order to use their local version. Please make sure that you pull in all exoplayer sub-libraries that MoPub and MyTarget use. Sample gradle code:
implementation ('com.google.ads.mediation:mytarget:5.4.6.0') {
        exclude group: "com.google.android.exoplayer"
}

 implementation ('com.google.ads.mediation:mopub:5.8.0.0') {
        exclude group: "com.google.android.exoplayer"
 }

 

Andrey Menscikov

unread,
Oct 4, 2019, 9:28:37 AM10/4/19
to Google Mobile Ads SDK Developers
Hello,

Thank you very much for help.
I tried with "exclude module" and it doesn't helped me, but "exclude group" works, thank you again.

Sincerely,
Andrejs
Reply all
Reply to author
Forward
0 new messages