gpt4 book ai didi

Flutter Error : No named parameter with the name 'onMediaDeviceChanged' . Flutter Context : Found this candidate, 但参数不匹配

转载 作者:行者123 更新时间:2023-12-05 05:29:41 25 4
gpt4 key购买 nike

Performing hot reload...
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/agora_uikit-1.1.0/lib/controllers/rtc_event_handlers.dart:140:6: Error: No named parameter
with the name 'onMediaDeviceChanged'.
}, onMediaDeviceChanged: (deviceType) {
^^^^^^^^^^^^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-6.1.0/lib/src/agora_rtc_engine.dart:1537:9: Context: Found this candidate,
but the arguments don't match.
const RtcEngineEventHandler({
^^^^^^^^^^^^^^^^^^^^^
Try again after fixing the above error(s).

Performing hot reload...
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/agora_uikit-1.1.0/lib/controllers/rtc_event_handlers.dart:140:6: Error: No named parameter
with the name 'onMediaDeviceChanged'.
}, onMediaDeviceChanged: (deviceType) {
^^^^^^^^^^^^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-6.1.0/lib/src/agora_rtc_engine.dart:1537:9: Context: Found this candidate,
but the arguments don't match.
const RtcEngineEventHandler({
^^^^^^^^^^^^^^^^^^^^^
Try again after fixing the above error(s).

Application finished.

我正在使用 agora 在我的 flutter 应用程序中创建视频通话功能。它应该为每次调用生成自动 token 。我用 Node.js 创建了一个后端服务器但是当我尝试运行我的应用程序时,我收到有关“onMediaDeviceChanged”的错误。我不太明白。请帮忙。

最佳答案

它看起来像最新版本的 agora_uikit 是 1.1.0 flutter 最新 sdk 版本有问题 3.3.10 .尝试降级你的 agora_uikit 依赖,如果你使用的是 1.1.0 版本,请尝试降级到 agora_uikit: ^1.0.2并添加 permission_handler: ^9.2.0在你的pubspec.yml文件,然后运行 ​​flutter pub get .

关于Flutter Error : No named parameter with the name 'onMediaDeviceChanged' . Flutter Context : Found this candidate, 但参数不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74892674/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com