> For the complete documentation index, see [llms.txt](https://ryukiedev.gitbook.io/wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ryukiedev.gitbook.io/wiki/flutter/06.android-zi-yuan-pei-zhi.md).

# 06.android资源配置

### 一、 App名称

android - app - src - main - AndroidManifest.xml - android:label

![1](https://4193904735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MI8JgbGh3U6X_oedqkm%2Fuploads%2Fgit-blob-d80406466ffdc5d032744b062f07a22877b5d1ad%2F06-01.png?alt=media)

### 二、 图片资源

与 iOS 不同，安卓应用的图片资源不是按 1x 2x 3x 来区分的。

android - app - src - main - res

哦们可以看到以下目录：

![2](https://4193904735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MI8JgbGh3U6X_oedqkm%2Fuploads%2Fgit-blob-5a3e9f2708091ce29c212cc397be729b7fab2c64%2F06-02.png?alt=media)

* mipmap-mdpi
  * 相当于 1x
* mipmap-hdpi
  * 相当于 1.5x
* mipmap-xhdpi
  * 相当于 2x
* mipmap-xxhdpi
  * 相当于 3x
* mipmap-xxxhdpi
  * 相当于 4x

![3](https://4193904735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MI8JgbGh3U6X_oedqkm%2Fuploads%2Fgit-blob-11a63fe4e999190efc08ca3eb5db889e3321b9d0%2F06-03.png?alt=media)

![4](https://4193904735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MI8JgbGh3U6X_oedqkm%2Fuploads%2Fgit-blob-408844a35847951293cd48c26cef5de5f22a5a76%2F06-04.png?alt=media)

> 注意： 命名不能驼峰，用下划线

### 三、 启动页

![5](https://4193904735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MI8JgbGh3U6X_oedqkm%2Fuploads%2Fgit-blob-1c5bcc121576e94680ef912cc1a0c928ced7c1c7%2F06-05.png?alt=media)

### 四、 其他图片

修改 pubspec.yaml 文件

```
# To add assets to your application, add an assets section, like this:
# assets:
#   - images/a_dot_burr.jpeg
#   - images/a_dot_ham.jpeg
```

注意：这里格式需要严格对齐

错误：

![6](https://4193904735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MI8JgbGh3U6X_oedqkm%2Fuploads%2Fgit-blob-fb56726f6d3a11964b66ad197117c84ad7364f3f%2F06-06.png?alt=media)

正确：

![7](https://4193904735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MI8JgbGh3U6X_oedqkm%2Fuploads%2Fgit-blob-40d5138437e1e859caaf34538303ef574e44f429%2F06-07.png?alt=media)

> 这里写入文件夹路径或者文件路径都可以

### 五、 使用图片

```
Image(image: AssetImage('路径/xxxxxx.png'))
```
