android – Desugaring of a Fragment inside a library is failing-ThrowExceptions

Exception or error:

I have a fragment VideoPlayerBaseFragment inside a library project.
I am using this library inside my app using artifactory build


When I am building my app it is throwing following error :

Default method desugaring of
failed because its super class is

My library module implements exoplayer library

api “”

I am unable to find the reason for this. It works fine with other libraries I have created and they also have fragment in them.

How to solve:

I also encountered this issue. The solution in my case turned out to be rather simple. I had to disable desugaring with D8 in my project’s file. This can be done with the 2 lines below:


You can then sync the project files, clean your project and build a debug apk. I encountered this issue when trying to build a debug apk or run instrumentation tests on an emulator running API 16, I never had when building release apk.

Leave a Reply

Your email address will not be published. Required fields are marked *