This app is using a deprecated version of the Android embedding. To avoid unexpected runtime fail..

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 `amap_flutter_location` requires your app to be migrated to the Android embedding v2. Follow the steps on the migration doc above and re-run this command.

首先,删除android -> app -> src -> main -> AndroidManifest.xml中的
android:name="io.flutter.app.FlutterApplication"

  1. 添加如下这段代码

  2.     android:name="${applicationName}"
        <meta-data
                android:name="flutterEmbedding"
                android:value="2" />

猜你喜欢

转载自blog.csdn.net/wangqing830414/article/details/131130665