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:
C:\Users\ALI HASSAN\OneDrive\Desktop\New folder\arcore_app\example\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="io.flutter.app.FlutterApplication"
...
至 :<application
android:name="${applicationName}"
...
如果不存在,添加这三行:<meta-data
android:name="flutterEmbedding"
android:value="2" />
...
Flutter 工具使用它来生成 GeneratedPluginRegistrant.java。
关于android - 构建 Flutter 应用时的 "Build failed due to use of deprecated Android v1 embedding",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71413851/