我收到以下错误。
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/