Skip to content

AGP8 build error #1535

@Meta-Learn-ApS

Description

@Meta-Learn-ApS

Checklist

  • I read the troubleshooting guide before raising this issue
  • I made sure that the issue I am raising doesn't already exist

Current bug behaviour

I get this error when I try to build:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':audioplayers_android:compileReleaseKotlin'.
> 'compileReleaseJavaWithJavac' task (current target is 1.8) and 'compileReleaseKotlin' task (current target is 11) jvm target compatibility should be set to the same Java version.
  Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain

I got the same error for the flutter_timezone package, and fixed it with some changes to the build.gradle file, see tjarvstrand/flutter_timezone#10

However, I do not understand the AGP, so not sure if this is a good solution.

Now the same problem happens with this package, so if anyone can help it would be nice ;)

Expected behaviour

No response

Steps to reproduce

  1. Execute flutter run on the code sample
  2. ...
  3. ...

Code sample

Code sample
void main() {
}

Affected platforms

Android

Platform details

No response

AudioPlayers Version

audioplayers: 4.1.0

Build mode

release

Audio Files/URLs/Sources

No response

Screenshots

No response

Logs

my relevant logs
Full Logs
my full logs or a link to a gist

Flutter doctor:

Output of: flutter doctor -v

Related issues / more information

No response

Working on PR

no way

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions