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.

IMA extension does not work with Java 8 from 2.16.0

See original GitHub issue

Not 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:closed
  • Created 2 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
toniheicommented, Jan 5, 2022

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.

More than one file was found with OS independent path ‘META-INF/annotation-experimental_release.kotlin_module’

I encountered the same problem, which you can fix by adding packagingOptions { exclude("META-INF/*.kotlin_module") } to your gradle project.

1reaction
toniheicommented, Nov 30, 2021

Closing the issue for now as this seems to be an app specific gradle issue.

Read more comments on GitHub >

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

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