Build failed due to use of deprecated Android v1 embedding.

原文:https://blog.51cto.com/u_15639793/5340424

 

问题:

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:

  /Users/mm/Desktop/studyProject/adDemo/android/app/src/main/AndroidManifest.xml
  uses `android:name="io.flutter.app.FutterApplication"`
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Build failed due to use of deprecated Android v1 embedding.

解决:

android/app/src/main下的找到AndroidManifest.xml修改application标签内容如下:

android:name="${applicationName}" //修改之前的android:name="io.flutter.app.FlutterApplication"

 

posted @ 2022-11-20 11:03  lude1994  阅读(1155)  评论(0)    收藏  举报