# 06.android资源配置

### 一、 App名称

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

![1](/files/cCfONc6us6emTK9owPZH)

### 二、 图片资源

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

android - app - src - main - res

哦们可以看到以下目录：

![2](/files/6QiXTW6TklvYfHdWj16E)

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

![3](/files/0onvnhWgwwiCPNZERqxO)

![4](/files/dXnYLSoIApa4kJ9yxTaH)

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

### 三、 启动页

![5](/files/2Ejum792H40N5nRGrBmi)

### 四、 其他图片

修改 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](/files/Dm9MWbsVYWgV6uTBeTBk)

正确：

![7](/files/FUfpTmrHDoijqgl2qkq9)

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

### 五、 使用图片

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ryukiedev.gitbook.io/wiki/flutter/06.android-zi-yuan-pei-zhi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
