您当前的位置: 首页 >  flutter

xiangzhihong8

暂无认证

  • 3浏览

    0关注

    1324博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Flutter Android embedding升级到v2

xiangzhihong8 发布时间:2022-03-30 10:54:28 ,浏览量:3

一、背景

为了更好地支持将Flutter添加到现有项目的执行环境,旧的Android平台端包装器在io.flutter.app.FlutterActivity及其相关类托管Flutter运行时已被弃用。取而代之的则是io.flutter.embedding.android.FlutterActivity及其相关的类。如果我们不进行升级,那么运行flutter doctor命令时会报如下的错误。

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:

  No `/Users/mac/android/AndroidManifest.xml` file
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

如果是纯Flutter工程,

关注
打赏
1482932726
查看更多评论
立即登录/注册

微信扫码登录

0.0529s