需要修改下面的文件 android/app/src/main/AndroidManifest.xml
修改后的样例:
<manifest>
<application android:name="${applicationName}">
<activity>
<!--
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
-->
</activity>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
有三点需要修改:
1、如下 将 android:name 的值改成: "${applicationName}"。
application android:name="${applicationName}"
2、删除下面节点:
android:resource="@drawable/launch_background
3、如下增加flutterEmbedding节点:
<meta-data
android:name="flutterEmbedding"
android:value="2" />
参考:
https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects