-
Notifications
You must be signed in to change notification settings - Fork 189
MissingPluginException(No implementation found for method play on channel bz.rxla.flutter/audio) #2
Comments
on an Android or iOS device ? |
on Android |
did you run |
Yes, I did. |
just to be clear, the default example works, but your code based on it doesn't ? |
Sorry, I put that wrong. I ran it on my code with the functions of the example project. I will try it out on the example project later, have to go now. I will let you know as soon as I do. |
Okay, If I use the example as it is, it works fine. But as soon as I delete the main method, and instead instantiate the view at another point, it gives me the errors. Is it necessary that the sound view is the first one to load? |
Maybe you can try to apply the same "lifecycle" than the example : init the plugin on the initState of the widget which needs to use it ? |
This issue seems not related to the library code, so I close it for now. Let me know if you can make your own example work. |
Still can't seem to figure it out... Could you maybe have a look at it? I copied the example's main.dart into soundManager.dart, added a route and navigated to it in the grid.dart file. I still get the same errors. |
your java MainActivity seems to be outdated, the Flutter plugin api changed a lot during last month or so. You should start with a new fresh project, or, update your flutter sdk, remove your android and iOS folders and |
Yes, you were right, it was outdated. Starting a fresh project solved the issue. Thank you a lot :) |
I have one more question. How can I call a sound that is in the same folder as my script calling it (e.g. calling lib\sound.mp3 from lib\main.dart), instead of using an internet url? |
🤔 hmm... I have no tried this. Maybe you should look at the assets managements docs. |
I'll for sure give it a star! I have tried an absolute path: as well as a relative one: Unfortunately, either an error or no sound :/ |
on mobile, each app has its own directory. Even the simulators work like this. In the example, I download the file in the dedicated app storage directory, and then can play it. But you AFAIK, you can only access to this "programmatically". |
Okay, thank you :) No problem 👍 |
[ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception: |
Make a supplement: the location of the
|
make a new project and replicate your current app this resolved my issue! |
The exception is thrown when you're doing hot reload or hot restart. I solved the problem by simply restarting the app |
I have tried your latest plugin version 0.8.0 and later but it's give me exception MissingPluginException(No implementation found for method play on channel bz.rxla.flutter/audio) When i tried with your version 0.7.0 then it's works fine. |
Worked for me downgrading to 0.7.0 |
I ran the init method from the example provided, and as soon as I play the sound, I get the error. The play method is taken from the exaple as well. The only thing I replaced was the url to the sound.
The text was updated successfully, but these errors were encountered: