启动libmain。在调试模式下为x86构建的Android SDK…lib main.dart: 1E/flutter (6606): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)]未处理异常:PlatformException(意外错误!)更改播放速率仅适用于Android M/23+或使用LOW_LATENCY模式。, java.lang.IllegalStateException:更改播放速率仅适用于Android M/23+或使用LOW_LATENCY模式。E/flutter (6606): at xyz.luan.audioplayer .player. mediaplayerplayer . setrate (MediaPlayerPlayer.kt:45)E/flutter (6606): at xyz.luan.audioplayers.player.WrappedPlayer.configAndPrepare(WrappedPlayer.kt:307)E/flutter(6606):在xyz.luan.audioplayers.player.WrappedPlayer.setSource(WrappedPlayer.kt:31)E/flutter (6606): at xyz.luan. audioplayersplugin .handler(AudioplayersPlugin.kt:91)E/flutter(6606):在xyz.luan.audioplayers. audioplayerplugin .access$handler(audioplayerplugin .kt:25)2E/flutter(6606):在xyz.luan. audioplayersplugin $ onattachdtoengine $1$1.invoke(AudioplayersPlugin.kt:41)E/flutter(6606):在xyz.luan. audioplayersplugin $safeCall$1. invokessuspend (AudioplayersPlugin.kt:62)E/flutter (6606): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)E/flutter (6606): at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)E/flutter (6606): at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)E/flutter (6606): at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)E/flutter (6606): at kotlinx. coroutinesscheduler . scheduler . runsafety (coroutinesscheduler .kt:570)E/flutter (6606): at kotlinx. coroutinesscheduler . coroutinesscheduler $Worker.executeTask(coroutinesscheduler .kt:750)
这是错误显示
检查错误,它建议更改播放速率仅支持android 23+。所以你可以删除这部分代码,或者在gradle文件中将minSdk更改为23。或者错误建议使用低延迟模式,此参数可在' play '函数中使用。