pub.dev 下载的demo 运行 flutter pub get 报错

1,265 阅读1分钟

错误提示

Warning

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

flutter.dev/go/android-…

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: /Users/jack/Downloads/fluro-2.0.3/example/android/app/src/main/AndroidManifest.xml uses android:name="io.flutter.app.FutterApplication"

  • Running "flutter pub get" in example... 610ms
  • 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: github.com/flutter/flu…
  • Process finished with exit code 0

解决方法 修改andriod/app/src/main/AndroidManifest.xml文件

示例: 源文件代码处模块:

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

修改后的文件:

<application
  android:name="${applicationName}"
  >
  <!-- code omitted -->
</application>`
博客书写时间为 2022.04.29