android - 此应用程序使用的是已弃用的 Android 嵌入版本

标签 android flutter android-studio dart android-layout

我收到以下错误。

This app is using a deprecated version of the Android embedding.
To avoid unexpected runtime failures-, or future build failures, try to migrate this app to the V2 embedding.
Take a look at the docs for migrating an app: https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects
The plugin `audio_session` requires your app to be migrated to the Android embedding v2. Follow the steps on https://flutter.dev/go/android-project-migration and re-run this command.

该应用程序已经使用 Android 嵌入,我使用的是 Flutter 2.23 版本。我也检查了这个。 https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects

我也没有使用 audio_session 插件,并且不知道哪个库正在使用它。有人可以帮忙吗?

最佳答案

我通过将应用程序标记中的“io.flutter.app.FlutterApplication”更改为“${applicationName}”解决了此错误。

以前的配置:

<application
  android:name="io.flutter.app.FlutterApplication"
  >
  <!-- code omitted -->
</application>

新配置:

<application
  android:name="${applicationName}"
  >
  <!-- code omitted -->
</application>

关于android - 此应用程序使用的是已弃用的 Android 嵌入版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71987510/

相关文章:

android - 如何在 Android 上解析 "Failed resolution of: Lcom/sun/mail/util/MailLogger"?

Flutter 地理定位器给出错误的纬度和经度

flutter - 如何在 dart 中将 double 值四舍五入到小数点后两位?

android - 如何在 Android Studio Logcat 中突出显示过滤器/搜索命中

android - 如何从ListView中获取项目

java - 什么被 Android UI 线程杀死

java - 如何从 Firebase 数据库中的用户获取数据?

sockets - 如何通过 Dart TCP 套接字发送原始字节

Android:使用 Android Studio 的代码覆盖工具

java - Kotlin 中的错误但仅使用 Java - 类 kotlin.reflect.jvm.internal.FunctionCaller$FieldSetter