【问题标题】:Try correcting the name to the name of an existing getter尝试将名称更正为现有 getter 的名称
【发布时间】:2022-08-16 22:15:36
【问题描述】:

错误:没有为类 \'AVAudioSessionCategory\' 定义 getter \'name\'。

  • \'AVAudioSessionCategory\' 来自 \'package:audioplayers_platform_interface/api/audio_context_config.dart\' (\'/D:/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers_platform_interface-1.0.0/lib/api/audio_context_config.dart\')。
    尝试将名称更正为现有 getter 的名称,或定义一个名为 \'name\' 的 getter 或字段。 \'类别\':类别.名称, ^^^^ /D:/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers_platform_interface-1.0.0/lib/api/audio_context_config.dart:243:39: 错误:没有为类 \'AVAudioSessionOptions\' 定义 getter \'name\'。
  • \'AVAudioSessionOptions\' 来自 \'package:audioplayers_platform_interface/api/audio_context_config.dart\' (\'/D:/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers_platform_interface-1.0.0/lib/api/audio_context_config.dart\')。
    尝试将名称更正为现有 getter 的名称,或定义一个名为 \'name\' 的 getter 或字段。 \'options\': options.map((e) => e.name).toList(),

    标签: flutter gradle getter audio-player nameerror


    【解决方案1】:

    可能是 2 个可能的问题导致它找不到吸气剂名称.. 但这里有一些可能的故障排除解决方案

    1. 您在 pubsec.yaml 中更改或错误拼写了项目的包名或名称。并且忘记将各个文件更改为该新名称。 (所以做那个更正)

    2. 您为旧版本的颤振编写了代码,后来升级颤振导致不匹配, 如果这就是你所做的,你需要降级你的flutter SDK ..如果你急于赶上最后期限,在这种情况下,这将是一个更快的解决方案,而不是逐行更新代码,如果它很大

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-07-26
      • 2021-05-13
      • 2021-01-08
      • 2022-07-06
      • 2020-09-03
      • 2023-02-07
      相关资源
      最近更新 更多