Maven unable to resolve 2.12.x exoplayer-core dependencies
See original GitHub issueGradle seems to have no problem downloading ExoPlayer, but I maintain a Java library that uses Maven for dependency management, and the following dependency:
<dependency>
<groupId>com.google.android.exoplayer</groupId>
<artifactId>exoplayer-core</artifactId>
<version>2.12.2</version>
<type>aar</type>
<scope>provided</scope>
</dependency>
produced the following error during mvn compile
(or any other task that pulls dependencies):
The following artifacts could not be resolved: com.google.android.exoplayer:exoplayer-common:jar:2.12.2, com.google.android.exoplayer:exoplayer-extractor:jar:2.12.2
I could see via bintray’s web interface that the files are there, so I dug further. This appears to be related to the pom files generated by Gradle. I can fix the problem by:
- Editing the exoplayer-core pom file downloaded by Maven, adding the
<type>aar</type>
line to its exoplayer-common and exoplayer-extractor dependencies - Removing exoplayer-common and exoplayer-extractor directories from my local repository (so Maven doesn’t think they’re cached)
- Rerunning the Maven task
- Editing the newly downloaded exoplayer-extractor pom file, again adding
<type>aar</type>
to its exoplayer-common dependency - Running the Maven task one last time
I would expect having <packaging>aar</packaging>
under the project
element (as ExoPlayer poms do) to address this problem, but apparently not, at least for runtime-scoped dependencies.
Note that I didn’t have this problem with 2.11.x—exoplayer-core
doesn’t have runtime dependencies on the other libraries in that version.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Failed to resolve dependency android - gradle - Stack Overflow
Try adding maven {url 'https://jitpack.io'} in settings.gradle. dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.
Read more >Hello world! - ExoPlayer
Adding ExoPlayer as a dependency. Add ExoPlayer modules. The easiest way to get started using ExoPlayer is to add it as a gradle...
Read more >Build failed after adding SDK - Zoom Developer Forum
I have followed the documentation to add android meeting SDK into an app. As mentioned in documentation I have added a both aar...
Read more >Changelog - IBM Video Streaming Developers
Google ExoPlayer's Core, HLS and UI components are now dependencies of the SDK. Do not forget to add the following lines to your...
Read more >com.google.android.exoplayer » exoplayer-core » 2.12.0
The ExoPlayer library core module. ... Vulnerabilities, Vulnerabilities from dependencies: ... Maven; Gradle; Gradle (Short); Gradle (Kotlin) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I guess this is the same issue as @andrewlewis on the bintray-release project in https://github.com/novoda/bintray-release/issues/212. We might just solve it by migrating away from bintray-release, which we need to do anyway for other reasons.
The commit above will work around the issue in future releases.