android - Exoplayer - 以下类的超类型无法解析
问题描述
我知道,有很多类似标题的问题。我已经经历了所有这些,尝试了所有提出的解决方案,但没有任何帮助。
我有一个带有一些Exoplayer
依赖项的 Android 库。我的图书馆已经出版JCenter
了几年,一切正常。现在JCenter
正在关闭,我迁移到MavenCentral/Sonatype
.
我添加了gradle-maven-publish-plugin以将我的库上传并发布到Sonatype
. Android Gradle Plugin
除了升级from3.5.1
到4.0.0
当然应用新添加的依赖项之外,我没有对我的代码进行任何更改gradle-maven-publish-plugin
。
结构如下。我的库包含一个类:
open class BasePlayer: Player.EventListener, AdEvent.AdEventListener, AdErrorEvent.AdErrorListener
在我的应用程序中,我扩展了这个类:
class MyPlayer: BasePlayer
现在,当我将新工件从添加MavenCentral/Sonatype
到我的项目时,项目构建并且我的库文件可以访问,但Exoplayer
依赖项不能访问。我收到以下错误:
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
是的,Exoplayer
我的库中的依赖项是使用api
而不是添加的implementation
——正如我提到的,这个库已经存在JCenter
了几年。
有什么想法吗?我已经为此苦苦挣扎了几天。如果您需要更多信息,请发表评论 - 我会在这里,像疯子一样刷新此页面 :)
解决方案
推荐阅读
- python - Python 3 - 元组超出范围错误。但我用的是字典?
- sql - 在 PostgreSQL 中的 SELECT SQL 语句中插入 SQL 语句
- python - 去除特定标点符号列表前后的空格
- android - 无法弄清楚如何将此字段保存到数据库中,保存整数列表
- r - r - 将 dplyr::group_by 与 purrr::pmap 结合使用
- html - Bootstrap 3.3.7 折叠按钮问题(不起作用)
- django - 通过 Django 在主页播放视频
- r - 如何处理 R markdown 中的空单元格?
- javascript - 将 Node js 与 Stripe 集成
- swift - 更改部分索引背景颜色