older version of the Android embedding
jsingh-github opened this issue · comments
Running "flutter pub get" in xylophone-flutter... 0.3s
Your Flutter application is created using an older version of the Android embedding. It's being deprecated in favor of Android embedding v2. Follow the steps on
https://flutter.dev/go/android-project-migration to migrate your project.
https://www.youtube.com/watch?v=nqY2kdEED5w
here's a video to help
or instead using the newest audioplayers you could use the same version
I have overwritten in the pubspec.yaml the version copied from flutter package download site with the audioplayers: ^0.10.0 and it worked
Solution :
Step 1 : Create a new flutter project at your local system
Step 2 : Copy the code given in 'main.dart' file of stub project and paste it into 'main.dart' file of your local project
Step 3 : Make an 'assets' folder in your local project
Step 4 : download sound-files from github and put them into your local 'assets' folder
Step 5 : in your local pubspec.yaml file, add dependency for your 'assets' folder
Step 6 : Rename 'MyApp()' in widget testing file to 'MaterialApp()'
Hit save(in files other than pubspec.yaml), get all dependencies(in pubspec.yaml) and you're good to go