question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Maven unable to resolve 2.12.x exoplayer-core dependencies

See original GitHub issue

Gradle 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:

  1. Editing the exoplayer-core pom file downloaded by Maven, adding the <type>aar</type> line to its exoplayer-common and exoplayer-extractor dependencies
  2. Removing exoplayer-common and exoplayer-extractor directories from my local repository (so Maven doesn’t think they’re cached)
  3. Rerunning the Maven task
  4. Editing the newly downloaded exoplayer-extractor pom file, again adding <type>aar</type> to its exoplayer-common dependency
  5. 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:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ojw28commented, Dec 17, 2020

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.

0reactions
toniheicommented, Jan 4, 2022

The commit above will work around the issue in future releases.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found