Skip to content

flutter stream asr demo 报错 #2597

@mikelhm

Description

@mikelhm

运行 /flutter-examples/streaming_asr 的项目 main.dart 会报错如下:

Launching lib/main.dart on PFFM10 in debug mode...
Running Gradle task 'assembleDebug'...
../../../../../admin/.pub-cache/hosted/pub.dev/record_linux-0.7.2/lib/record_linux.dart:12:7: Error: The non-abstract class 'RecordLinux' is missing implementations for these members:

  • RecordMethodChannelPlatformInterface.startStream
    Try to either
  • provide an implementation,
  • inherit an implementation from a superclass or mixin,
  • mark the class as abstract, or
  • provide a 'noSuchMethod' implementation.

class RecordLinux extends RecordPlatform {
^^^^^^^^^^^
../../../../../admin/.pub-cache/hosted/pub.dev/record_platform_interface-1.4.0/lib/src/record_platform_interface.dart:46:29: Context: 'RecordMethodChannelPlatformInterface.startStream' is defined here.
Future<Stream> startStream(String recorderId, RecordConfig config);
^^^^^^^^^^^
Target kernel_snapshot_program failed: Exception

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command '/Users/admin/Documents/flutter/bin/flutter'' finished with non-zero exit value 1

flutter doctor 环境正常

Image

看上去是 linux 不支持录音,但是我选择的是android 进行安装,却上报上面错误

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions