londonappbrewery / xylophone-flutter

Starter code for the Xylophone project in the Complete Flutter Bootcamp

Home Page:https://www.appbrewery.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Application won't work with the package AudioPlayers on Android VM

ashishbairwa opened this issue · comments

For some reason, the application throws an error,
audioplayersPlugin(28127): java.lang.RuntimeException: Unable to access resource
However, even after adding the permission in the manifest won't work and reproduces the error.
• You can add a note in the course to either use a different package available. Here is a really nice list
https://medium.com/flutter-community/how-to-add-music-audio-to-your-flutter-app-dcb6162c32d7
• I used Assetsaudioplayer and it worked absolutely fine.

                _assetsAudioPlayer = AssetsAudioPlayer();
                _assetsAudioPlayer.open(AssetsAudio(
                  asset: "note1.wav",
                  folder: "assets/",
                ));
                _assetsAudioPlayer.play();
              },```

Bro if you found the solution please let me know

Just a suggestion :

Use an appropriate physical device as long as this problem isn't resolved