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.

Cannot use ExoPlayer 2.10.0 with Android support libraries

See original GitHub issue

While 2.9.6 allowed use of the Android Support Libraries, 2.10.0 does not, producing an error during project sync:

ERROR: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
	is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
	Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:12:5-50:19 to override.

I do not see anywhere in the release notes noting that 2.10.0 requires switching to AndroidX. We’ve tried to switch to AndroidX, but the automated migration tooling fails as per https://stackoverflow.com/questions/53853617/enabling-androidx-causes-cannot-change-strategy-of-configuration-appcompile – and no one has provided a resolution to this.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

14reactions
JessHollecommented, May 13, 2019

Okay, it is understandable that from ExoPlayer’s perspective this should be closed.

The corresponding bug I filed against the AndroidX migration should remain open, however, as a migration that fails for various build.gradle files with an error that provides no guidance as to how the issue can be addressed is not an acceptable path to AndroidX. There’s a reason the stackoverflow query about this issue remains open – it appears that the AndroidX migration tooling simply can’t handle a good number of perfectly valid build.gradle files.

Also for ExoPlayer there really should be a clear banner in the release notes, noting that this version now requires one to have migrated to AndroidX!

3reactions
marcbaechingercommented, May 11, 2019

When I create a new project in Android Studio and I have these dependencies in my gradle file I receive the above error as you report it:

implementation 'com.google.android.exoplayer:exoplayer-core:2.10.0'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.10.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'

Then I add the following to my gradle.properties

android.enableJetifier=true
android.useAndroidX=true

And I can build and deploy the app after having updated the import statements. I’m not sure if this works with your project as well, as it’s a tiny no-op sample app only.

I found this here: https://developer.android.com/jetpack/androidx and I am using Android Studio 3.4 with the targetSdkVersion and compileSdkVersion set to 28.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not find com.google.android.exoplayer ... - Stack Overflow
Exoplayer library version 2.4.2 isn't found on Google's Maven Repo anymore. Change the implementation to this
Read more >
Local ExoPlayer build not working with mediation libraries
The problem is that I can't use AdMob ads with MoPub & myTarget mediation libraries with ExoPlayer local build (I think all other...
Read more >
Hello world! - ExoPlayer
An application level media player for Android.
Read more >
Changelog - IBM Video Streaming Developers
Changed · Inconsistent player init when a process is restarted from savedInstanceState by the Android framework. · No more crash if the Activity's...
Read more >
RELEASENOTES.md - google/ExoPlayer - Sourcegraph
Add `ExoPlayer. ... Enable support for Android platform diagnostics via ... Log warnings when extension native libraries can't be used, to help with....
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