ukasz123 / soundpool

Soundpool plugin for Flutter
88 stars 63 forks source link

MissingPluginException(No implementation found for method initSoundpool on channel pl.ukaszapps/soundpool) #107

Open gracegyu opened 1 year ago

gracegyu commented 1 year ago

hello. I'm making a game with Flutter and trying to add sound effects using soundpool. However, the following error occurs in the rootBundle.load function.

flutter: ----------------FIREBASE CRASHLYTICS----------------
flutter: MissingPluginException(No implementation found for method initSoundpool on channel pl.ukaszapps/soundpool)
flutter: 
#0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:160:7)
<asynchronous suspension>
#1      Soundpool._connect (package:soundpool/soundpool.dart:290:20)
<asynchronous suspension>
flutter: ----------------------------------------------------

my code is here

import 'package:soundpool/soundpool.dart';

  Soundpool _pool = Soundpool(streamType: StreamType.notification);
  int soundIdClick;
  soundIdClick = await rootBundle.load("assets/sound/click.mp3").then((ByteData soundData) {
-----> error message
        return _pool.load(soundData);
  });

 //// ......

  void playSoundClick() async {
    if (gSettingData.isSound) await _pool.play(soundIdClick);
  }

MrCsabaToth commented 1 year ago

Is this in debug mode or only in release?

umanamente commented 1 year ago

I have the same error when building for Windows platform, and it occurs for Debug mode as well.

eximius313 commented 9 months ago

it's because Windows is not yet supported although I see there is some experimental support branch: https://github.com/ukasz123/soundpool/issues/46#issuecomment-1002172727

@ukasz123, shouldn't this issue be closed as duplicate of #46 ?