After I added assets_audio_player package I started to get this error :
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':assets_audio_player:compileDebugKotlin'.
'compileDebugJavaWithJavac' task (current target is 1.8) and 'compileDebugKotlin' 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 On the other hand,This app can run on IOS simulator and real device. Really, I can't understand this error, how can I fix? Thanks.
- After I searched similar errors, I updated assets_audio_player dependency as
assets_audio_player:
git:
url: https://github.com/florent37/Flutter-AssetsAudioPlayer
android/app/build.gradlefile, try this code: ` compileOptions { sourceCompatibility JavaVersion.VERSION_11 targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { jvmTarget = '11' }`