Exoplayer - Supertypes of the following classes cannot be resolved

Viewed 98

There are tons of questions with a similar title, I know. I've been through them all, tried all the proposed solutions but nothing helped.

I have an Android library with a few Exoplayer dependencies. My library is published on JCenter for a couple of years now and everything works fine. Now JCenter is shutting down and I migrated to MavenCentral/Sonatype.

I added gradle-maven-publish-plugin to upload and publish my library to Sonatype. I made no changes to my code apart from upgrading the Android Gradle Plugin from 3.5.1 to 4.0.0 and of course applying the dependencies that the newly added gradle-maven-publish-plugin requires.

The structure is as follows. My library contains a class:

open class BasePlayer: Player.EventListener, AdEvent.AdEventListener, AdErrorEvent.AdErrorListener

And in my app I extend this class:

class MyPlayer: BasePlayer

Now when I add the new artifact from MavenCentral/Sonatype to my project, the project builds and my library files are accessible but not the Exoplayer dependencies. I get the following error(s):

Cannot access 'com.google.android.exoplayer2.Player$EventListener' which is a supertype of 'com.test.playground.myapplication.MyPlayer'. Check your module classpath for missing or conflicting dependencies
Cannot access 'com.google.ads.interactivemedia.v3.api.AdEvent$AdEventListener' which is a supertype of 'com.test.playground.myapplication.MyPlayer'. Check your module classpath for missing or conflicting dependencies
Cannot access 'com.google.ads.interactivemedia.v3.api.AdErrorEvent$AdErrorListener' which is a supertype of 'com.test.playground.myapplication.MyPlayer'. Check your module classpath for missing or conflicting dependencies

And yes, the Exoplayer dependencies in my library are added using api and not implementation - as I mentioned this library has been live on JCenter for a couple of years now.

Any thoughts? I've been struggling with this for a couple of days now. If you need more info, just leave a comment - I'll be here, refreshing this page like a maniac :)

0 Answers
Related