Android Question Androidx MediaPlayer Error

Murilo Besse

Member
Licensed User
Longtime User
Hi, I'm trying to use Mopub Library and this error appears when I click on show intersticial.
"Failed resolution of: Landroidx/media2/player/MediaPlayer;"
 

drgottjr

Expert
Licensed User
Longtime User
either you don't have the media2 .aar or you didn't include it in your project (#AdditionalJar: ...)
if you don't have it, google maven androidx/media2/player/MediaPlayer and follow the link to maven. it's there.
 
Upvote 0

Murilo Besse

Member
Licensed User
Longtime User
I did include "#AdditionalJar: androidx.media2:media2-player", but another error shows up:

"Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)"
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
Upvote 0

Murilo Besse

Member
Licensed User
Longtime User
Yes I got to this thread about desugar, but I'm not sure if I understood the explanation.
I'll spend more time and try again tomorrow.
Thanks for your help!
 
Upvote 0
Top