babariviere / flutter-nix-hello-world

Demonstration on how to use flutter with Nix
52 stars 10 forks source link

Build failed due to use of deprecated Android v1 embedding. #8

Closed hoh closed 1 year ago

hoh commented 1 year ago

I am trying to use Flutter on NixOS. When trying this repository, I am facing the following error:

user@host ~/flutter_nix_hello_world (master)> nix-shell

[nix-shell:~/flutter_nix_hello_world]$ flutter build apk
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It is being deprecated in favor of Android embedding v2. Follow the
steps at

https://flutter.dev/go/android-project-migration

to migrate your project. You may also pass the --ignore-deprecation flag to
ignore this check and continue with the deprecated v1 embedding. However,
the v1 Android embedding will be removed in future versions of Flutter.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The detected reason was:

  /home/sepal/Documents/Repos/playground/flutter_nix_hello_world/android/app/src/main/AndroidManifest.xml uses
  `android:name="io.flutter.app.FlutterApplication"`
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Build failed due to use of deprecated Android v1 embedding.
babariviere commented 1 year ago

Fixed with the latest commit!