Skip to content

Bug: "Failed to transform file 'classes.jar' to match attributes" #5541

Closed
@AndroidDeveloperLB

Description

@AndroidDeveloperLB

Issue description

Today I wanted to make a POC of muxing video&audio, and use ExoPlayer to view the output video.
All went fine, till I wanted to add ExoPlayer dependency, which caused a build error when trying to run the app.

Reproduction steps

  1. Import project:

VideoAndAudioMux.zip

  1. add the ExoPlay dependency:

    implementation 'com.google.android.exoplayer:exoplayer-core:2.9.5'
    implementation 'com.google.android.exoplayer:exoplayer-ui:2.9.5'

  2. Try to run the app.

Link to test content

There is no content to test. It's a build error.
Here's a video showing the issue:

2019-02-20_11-52-36.zip

Version of ExoPlayer being used

2.9.5 , but it seems to occur on previous ones too.

Device(s) and version(s) of Android being used

Android Studio 3.3.1
Build #AI-182.5107.16.33.5264788, built on January 29, 2019
JRE: 1.8.0_152-release-1248-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

A full bug report captured from the device

IDE log:

idea.log

This is the build error log:

Transform exoplayer-core.aar (com.google.android.exoplayer:exoplayer-core:2.9.5) with DexingTransform
AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): void com.google.android.exoplayer2.Player$EventListener.onLoadingChanged(boolean)","sources":[{}],"tool":"D8"}

Task :app:transformNativeLibsWithMergeJniLibsForDebug

Task :app:mergeExtDexDebug
AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): java.lang.String com.google.android.exoplayer2.ui.PlayerNotificationManager$MediaDescriptionAdapter.getCurrentSubText(com.google.android.exoplayer2.Player)","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): void com.google.android.exoplayer2.Player$EventListener.onLoadingChanged(boolean)","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): void com.google.android.exoplayer2.Player$EventListener.onLoadingChanged(boolean)","sources":[{}],"tool":"D8"}

Task :app:mergeExtDexDebug FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not resolve all files for configuration ':app:debugRuntimeClasspath'.

Failed to transform file 'classes.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=16} using transform DexingTransform
Error while dexing.
Failed to transform file 'classes.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=16} using transform DexingTransform
Error while dexing.
Failed to transform file 'classes.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=16} using transform DexingTransform
Error while dexing.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 11s
23 actionable tasks: 8 executed, 15 up-to-date

Activity

AndroidDeveloperLB

AndroidDeveloperLB commented on Feb 20, 2019

@AndroidDeveloperLB
Author

Damn it's again the issue of the Java 1.8...

Had to add this:

  compileOptions {
        sourceCompatibility '1.8'
        targetCompatibility '1.8'
    }

This should be the default for new projects on the IDE...

gdky005

gdky005 commented on Apr 17, 2019

@gdky005

太感谢了,昨天折腾了好久,终于搞定了。

locked and limited conversation to collaborators on Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @gdky005@AndroidDeveloperLB

        Issue actions

          Bug: "Failed to transform file 'classes.jar' to match attributes" · Issue #5541 · google/ExoPlayer