Cannot use ExoPlayer 2.10.0 with Android support libraries
See original GitHub issueWhile 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:
- Created 4 years ago
- Comments:10 (3 by maintainers)
Top 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 >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 >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
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!
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:
Then I add the following to my gradle.properties
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.