You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unhandled Exception: MissingPluginException for preparePlayer Method in audio_waveforms Plugin #338
After selecting an MP3 file in my Flutter application, I encountered an error in the terminal:
Unhandled Exception: MissingPluginException(No implementation found for method preparePlayer on channel simform_audio_waveforms_plugin/methods)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:308:7)
This error occurs when attempting to prepare the audio player using the preparePlayer method from the audio_waveforms plugin.
This is my code for preparePlayer:
void initAudioPlayer() async {
await playerController.preparePlayer(path: widget.path);
}
I am experiencing the same issue with the audio_waveforms plugin. Specifically, I am encountering the following error:
Here is a brief summary of what I have tried so far:
Dependencies: I have included the latest version of flutter_audio_waveforms in my pubspec.yaml file and ran flutter pub get.
Platform-Specific Configuration:
Android: Verified that the plugin is correctly configured in android/app/build.gradle and that there are no issues with the MainActivity.java or MainActivity.kt files.
iOS: Checked that the plugin is added to the Podfile and that pod install was run successfully.
Code Implementation: Implemented the plugin in my Dart code and ensured that I am calling methods like preparePlayer after initializing the plugin.
Despite following these steps, the issue persists. Here is the relevant code snippet where the issue occurs:
... @OverRide
void initState() {
super.initState();
controller = PlayerController();
_preparePlayer();
...
}
...
void _preparePlayer() async {
....
controller.preparePlayer(
path: _localPath,
shouldExtractWaveform: true,
);
...
}
...
Additional Information:
Flutter Version: 3.24.3
Plugin Version: 1.0.5
Platform: Android
I would greatly appreciate any guidance or solutions for resolving this issue. It seems that there might be an integration problem or a missing implementation in the plugin. Thank you for your assistance.
Activity
BayKIRMIZI commentedon Sep 16, 2024
Hello,
I am experiencing the same issue with the audio_waveforms plugin. Specifically, I am encountering the following error:
Here is a brief summary of what I have tried so far:
Dependencies: I have included the latest version of flutter_audio_waveforms in my pubspec.yaml file and ran flutter pub get.
Platform-Specific Configuration:
Android: Verified that the plugin is correctly configured in android/app/build.gradle and that there are no issues with the MainActivity.java or MainActivity.kt files.
iOS: Checked that the plugin is added to the Podfile and that pod install was run successfully.
Code Implementation: Implemented the plugin in my Dart code and ensured that I am calling methods like preparePlayer after initializing the plugin.
Despite following these steps, the issue persists. Here is the relevant code snippet where the issue occurs:
...
@OverRide
void initState() {
super.initState();
controller = PlayerController();
_preparePlayer();
...
}
...
void _preparePlayer() async {
....
controller.preparePlayer(
path: _localPath,
shouldExtractWaveform: true,
);
...
}
...
Additional Information:
Flutter Version: 3.24.3
Plugin Version: 1.0.5
Platform: Android
I would greatly appreciate any guidance or solutions for resolving this issue. It seems that there might be an integration problem or a missing implementation in the plugin. Thank you for your assistance.
himanshuGandhiSimform commentedon Oct 10, 2024
Hello, @BayKIRMIZI @AtharvaChavan04 Can you please try to delete the app and again install the app Before installing the app, please do flutter clean.
ujas-m-simformsolutions commentedon Oct 16, 2024
Closing this as duplicate of #273.