Flutter-AssetsAudioPlayer icon indicating copy to clipboard operation
Flutter-AssetsAudioPlayer copied to clipboard

Execution failed for task ':assets_audio_player_web:compileDebugKotlin'.

Open armagangok opened this issue 1 year ago • 11 comments
trafficstars

Flutter Version 3.24.4

My version :

Lib Version

My version :

Platform (Android / iOS / web) + version

Platform :

Describe the bug

  • What went wrong: Execution failed for task ':assets_audio_player_web:compileDebugKotlin'.

Error while evaluating property 'compilerOptions.jvmTarget' of task ':assets_audio_player_web:compileDebugKotlin'. Failed to calculate the value of property 'jvmTarget'. > Unknown Kotlin JVM target: 21

armagangok avatar Nov 08 '24 13:11 armagangok

+1

pyaehein avatar Nov 09 '24 01:11 pyaehein

+1

ElemenzaDev avatar Nov 18 '24 19:11 ElemenzaDev

+1

joveptesg avatar Nov 19 '24 02:11 joveptesg

+1

a-rfl avatar Nov 20 '24 09:11 a-rfl

+1

SigosAmigo avatar Dec 05 '24 12:12 SigosAmigo

Note: This change will not work for Flutter web platforms.

Try changing the following in pubspec.yaml:

Before:

dependencies:
  assets_audio_player: ^3.1.1

After:

dependencies:
  assets_audio_player:
    git:
      url: https://github.com/Rupakpoddar/Flutter-AssetsAudioPlayer

Rupakpoddar avatar Dec 14 '24 03:12 Rupakpoddar

+1

Any workaround?

vlowe85 avatar Dec 17 '24 17:12 vlowe85

I had the same issue, and can confirm that setting the dependency to @Rupakpoddar's branch does work as a temporary fix.

Note: This change will not work for Flutter web platforms.

Try changing the following in pubspec.yaml:

Before:

dependencies:
  assets_audio_player: ^3.1.1

After:

dependencies:
  assets_audio_player:
    git:
      url: https://github.com/Rupakpoddar/Flutter-AssetsAudioPlayer

EDIT

This should be fixed in https://github.com/florent37/Flutter-AssetsAudioPlayer/pull/858, just waiting for new release, but as temporary fix can point to the repo branch

dependencies:
  # Can be changed back once a new version is released after 3.1.1
  assets_audio_player:
    git:
      url: https://github.com/florent37/Flutter-AssetsAudioPlayer

Christiaan-Mathu avatar Dec 18 '24 11:12 Christiaan-Mathu

I am facing the same issue. How to solve it?

Mamun-Lab avatar Dec 19 '24 09:12 Mamun-Lab

I think Android Studio Ladybug updated JDK to 21 for me, I downloaded JDK 17 and set flutter to use it. Now it builds ok again without having to update gradle etc.

vlowe85 avatar Dec 19 '24 10:12 vlowe85

I think Android Studio Ladybug updated JDK to 21 for me, I downloaded JDK 17 and set flutter to use it. Now it builds ok again without having to update gradle etc.

Thanks man !! This helped me !!

Broody-boy avatar Dec 28 '24 22:12 Broody-boy

Not found

url: https://github.com/florent37/Flutter-AssetsAudioPlayer

Rajkumar07793 avatar Jul 16 '25 08:07 Rajkumar07793