Unable to build APK due the package "Audioplayers" Unable to build APK due the package "Audioplayers" dart dart

Unable to build APK due the package "Audioplayers"


As far as I can see, it's a bug.

As with all bugs, you can wait for a fix or you can downgrade the package until you find a version where it still worked.

Alternatively, you can dig into the code yourself, fix it and open a pull request.


you can try upgrade ext.kotlin_version to '1.4.21' on the build.gradleIt work for me!. Github Discussion


As @Teja correctly pointed out, the error was that your project is using an outdated version of kotlin that didn't support some features like trailing commas.

The real fix is to update your app configuration (explained above).

However, to avoid confusion I merged this PR that also downgrades our code so that it works on old versions of kotlin. That has been merged and released on 0.17.3 and up (currently we are at 0.17.4).

Therefore, this is fixed. There is no reason to downgrade AP anymore on your apps.