londonappbrewery / xylophone-flutter

Starter code for the Xylophone project in the Complete Flutter Bootcamp
https://www.appbrewery.co
115 stars 884 forks source link

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

Open ashishbairwa opened 4 years ago

ashishbairwa commented 4 years ago

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();
              },```
harshrocks commented 3 years ago

Bro if you found the solution please let me know

AkshaySiddannavar commented 2 years ago

Just a suggestion :

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