IMA extension does not work with Java 8 from 2.16.0
See original GitHub issueNot sure if that is intended, but my Android Studio project (based on Java 1.8) won’t compile with
implementation 'com.google.android.exoplayer:extension-ima:2.16.0'
It works for 2.15.1 and below.
(I’m implementing the IMA player code from https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side into an existing Java project)
from the error listing:
> Task :app:checkDebugAarMetadata FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.core:core:1.7.0.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
IMA extension does not work with Java 8 from 2.16.0 - Codesti
I was able to resolve the build errors by upgrading our Android Gradle Plugin from v4.2.2 to v7.0.4 and changing our Java compilation...
Read more >Get started | IMA SDK for Android - Google Developers
In the Configure your project page, name your project and select Java for the language. Note:The IMA SDK is compatible with Kotlin.
Read more >ExoPlayer/RELEASENOTES.md at release-v2 - GitHub
Create an instance with MetadataRenderer(MetadataOutput, Looper, MetadataDecoderFactory, boolean) to specify whether the renderer will output metadata early or ...
Read more >Media3 - Android Developers
You can use the Media3 issue tracker to find answers to questions, known issues and feature requests, and to file new issues.
Read more >Hello world! - ExoPlayer
Another way to get started is to work through the ExoPlayer codelab. ... If not enabled already, you need to turn on Java...
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 Free
Top 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
I don’t think Java 11 is needed by either IMA or ExoPlayer’s IMA extension. IMA only added this configuration to their demo app (and the linked guide) because Android Studio’s Gradle plugin version 7.0.0 and above requires Gradle to run with Java 11 for compilation (which is also the default in Android Studio since Arctic Fox). They don’t actually have to declare this in their gradle file with
targetCompatibility JavaVersion.VERSION_11
, as you can verify by removing these lines from their sample app.I just tested ad playback with ExoPlayer 2.16.1 (and IMA 3.25.1) in a clean app that builds using Java 8 and has only
targetCompatibility JavaVersion.VERSION_1_8
defined, and everything is working just fine.I encountered the same problem, which you can fix by adding
packagingOptions { exclude("META-INF/*.kotlin_module") }
to your gradle project.Closing the issue for now as this seems to be an app specific gradle issue.