gpt4 book ai didi

android - 构建 Flutter 应用时的 "Build failed due to use of deprecated Android v1 embedding"

转载 作者:行者123 更新时间:2023-12-04 23:36:06 25 4
gpt4 key购买 nike

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com