0

I am building app which is done by famous youtube channel-Codepur. I was trying to build music player app, I used 'flute_music_player:' in dependency. But issues are comming in the way. The console message is:

* The plugin flute_music_player uses a deprecated version of the Android embedding. To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs. If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration. Launching lib\main.dart on Chrome in debug mode... Error: Cannot run with sound null safety, because the following dependencies don't support null safety:

  • package:flute_music_player

For solutions, see https://dart.dev/go/unsound-null-safety

Unhandled exception: Bad state: Unsupported Null Safety mode NonNullableByDefaultCompiledMode.Invalid, in null. #0 ProgramCompiler.emitModule (package:dev_compiler/src/kernel/compiler.dart:511:9)

#1 IncrementalJavaScriptBundler.compile (package:frontend_server/src/javascript_bundle.dart:214:33) #2 FrontendCompiler.writeJavascriptBundle (package:frontend_server/frontend_server.dart:721:46) #3 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:614:9)

#4 listenAndCompile. (package:frontend_server/frontend_server.dart:1222:11)

the Dart compiler exited unexpectedly. Failed to compile application. Exited (sigterm) *

If needed more info, head to app's source code and plugins : https://github.com/iampawan/Flutter-Music-Player or his yt video: https://www.youtube.com/watch?v=eWicXD5vkyg&list=PLR2qQy0Zxs_UdqAcaipPR3CG1Ly57UlhV&index=25

I am new to stackoverflow, so you can point out mistakes while asking question.

I tried to do things mentioned on ChatGPT but it's quite hard to understand those.

1 Answers1

2

That package hasn't been updated in five years, and is not compatible with current versions of Dart and Flutter.

You will need to either find a different package to use that is being maintained, or fork that package and update it yourself (adding null safety on the Dart side, updating the plugin APIs in the native Android code, and potentially other changes as well).

smorgan
  • 20,228
  • 3
  • 47
  • 55