最近学flutter,网上下载别人的flutter工程尝试运行flutter pub get
,报错如下:提示我需要将flutter从V1项目升级V2
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at
https://flutter.dev/go/android-project-migration
to migrate your project.
根据官方提供的地址以及参考提供的方法,最终只需要改动\android\app\src\main目录下的AndroidManifest.xml文件。增加如下内容:
<manifest>
<application>
<meta-data android:name="flutterEmbedding" android:value="2" />
</application>
</manifest>
网友评论