flutter (未找到通道xyz.luan/audioplayer上的setNotification方法的实现)

v1uwarro  于 2023-02-13  发布在  Flutter
关注(0)|答案(1)|浏览(226)

我正在为我的音乐应用程序使用音频播放器0.16.1库,但我在构建通知时不断收到以下错误。我的错误代码:

Exception has occurred.
MissingPluginException (MissingPluginException(No implementation found for method setNotification on 
channel xyz.luan/audioplayers))

我的setNotification方法:

setNotification() async {
await advancedPlayer.setNotification(
    albumTitle: "Beatifun Music",
    artist: video.snippet.channelTitle,
    duration: _duration,
    elapsedTime: _position,
    backwardSkipInterval: Duration(seconds: 10),
    forwardSkipInterval: Duration(seconds: 10),
    imageUrl: video.snippet.thumbnails.high.url,
    title: video.snippet.title);
    }

我怎样才能解决这个问题?

mklgxw1f

mklgxw1f1#

尝试使用AudioPlayers的最新版本(3.0.1),应该可以解决。

相关问题