Android
- 配置appID
文件夹目录android/app/build.gradle中
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.cystudio.cayj_cystudio"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
- 配置App名称
文件夹目录:android/app/src/main/AndroidManifest.xml
android:label="APP名称"
- 配置应用图标
文件夹目录:android/app/src/main/res/
对应文件尺寸:
hdpi :72 x 72
mdpi:48 x 48
xhdpi:96 x 96
xxhdpi:144 x 144
xxxhdpi:192 x 192
文件要和配置文件中的文件名对齐:ic_launcher.png
android:icon="@mipmap/ic_launcher">
- 配置应用引导图
文件夹目录:android/app/src/main/res/drawable
默认配置:
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
如果要插入图片则如下操作:
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item>
</layer-list>
在不同的dpi文件中放入对齐配置文件名launch_image.png图片
launch_image尺寸对应表:
hdpi :480 x 800
mdpi:320 x 480
xhdpi:720 x 1280
xxhdpi:1080 x 1920
xxxhdpi:3840 x 2160