Skip to content

Commit 9c54b6a

Browse files
committed
📝 Update FAQ
1 parent b317b04 commit 9c54b6a

File tree

2 files changed

+22
-26
lines changed

2 files changed

+22
-26
lines changed

README-ZH.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Language: [English](README.md) | 中文简体
4242
* [类介绍](#类介绍-)
4343
* [`AssetEntity`](#assetentity)
4444
* [常见问题](#常见问题-)
45-
* [`xxx` 版本获取冲突 (例如 `dartx`)](#xxx-版本获取冲突-例如-dartx)
45+
* [编译时报错 `Unresolved reference: R`](#编译时报错-unresolved-reference-r)
4646
* [如何获取资源的路径以进行上传或编辑等操作的整合?](#如何获取资源的路径以进行上传或编辑等操作的整合)
4747
* [如何更改 'Recent' 或其他路径的名称或属性?](#如何更改-recent-或其他路径的名称或属性)
4848
* [`File``Uint8List` 创建 `AssetEntity` 的方法](#从-file-或-uint8list-创建-assetentity-的方法)
@@ -308,21 +308,19 @@ Future<AssetEntity> refreshProperties() async;
308308

309309
## 常见问题 ❔
310310

311-
### `xxx` 版本获取冲突 (例如 `dartx`)
311+
### 编译时报错 `Unresolved reference: R`
312312

313-
`dartx` 或其他依赖可能因为某些原因使用了与你的项目不同的版本。如果你遇到了与下面内容类似的错误::
313+
```groovy
314+
e: <path>\photo_manager-x.y.z\android\src\main\kotlin\top\kikt\imagescanner\core\PhotoManagerDeleteManager.kt: (116, 36): Unresolved reference: R
315+
e: <path>\photo_manager-x.y.z\android\src\main\kotlin\top\kikt\imagescanner\core\PhotoManagerDeleteManager.kt: (119, 36): Unresolved reference: createTrashRequest
316+
e: <path>\photo_manager-x.y.z\android\src\main\kotlin\top\kikt\imagescanner\core\PhotoManagerPlugin.kt: (341, 84): Unresolved reference: R
317+
e: <path>\photo_manager-x.y.z\android\src\main\kotlin\top\kikt\imagescanner\core\utils\Android30DbUtils.kt: (34, 34): Unresolved reference: R
318+
e: <path>\photo_manager-x.y.z\android\src\main\kotlin\top\kikt\imagescanner\core\utils\IDBUtils.kt: (27, 67): Unresolved reference: R
314319
320+
FAILURE: Build failed with an exception.
315321
```
316-
Because dartx >=0.2.0 <0.5.0 depends on collection >=1.14.11 <1.15.0 and every version of flutter from sdk depends on collection 1.15.0-nullsafety, dartx >=0.2.0 <0.5.0 is incompatible with flutter from sdk.
317-
So, because wechat_assets_picker_demo depends on both flutter any from sdk and dartx ^0.4.2, version solving failed.
318-
```
319-
320-
将以下代码添加至你的 `pubspec.yaml`
321322

322-
```yaml
323-
dependency_overrides:
324-
dartx: ^0.4.2
325-
```
323+
请执行 `flutter clean`
326324

327325
### 如何获取资源的路径以进行上传或编辑等操作的整合?
328326

README.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ See [Contribute custom implementations](example/lib/customs/CONTRIBUTING.md) for
4545
* [Customize with your own type or UI](#customize-with-your-own-type-or-ui)
4646
* [Classes Introduction](#classes-introduction-)
4747
* [`AssetEntity`](#assetentity)
48-
* [Frequent asked question](#frequent-asked-question-)
49-
* [Version resolve conflict with `xxx` (e.g. `dartx`)](#version-resolve-conflict-with-xxx-eg-dartx)
48+
* [Frequently asked question](#frequently-asked-question-)
49+
* [Build failed with `Unresolved reference: R`](#build-failed-with-unresolved-reference-r)
5050
* [How can I get path from the `AssetEntity` to integrate with `File` object, upload or edit?](#how-can-i-get-path-from-the-assetentity-to-integrate-with-file-object-upload-or-edit)
5151
* [How can I change the name of "Recent" or other entities name/properties?](#how-can-i-change-the-name-of-recent-or-other-entities-nameproperties)
5252
* [Create `AssetEntity` from `File` or `Uint8List` (rawData)](#create-assetentity-from-file-or-uint8list-rawdata)
@@ -309,23 +309,21 @@ Future<String> getMediaUrl();
309309
Future<AssetEntity> refreshProperties() async;
310310
```
311311

312-
## Frequent asked question ❔
312+
## Frequently asked question ❔
313313

314-
### Version resolve conflict with `xxx` (e.g. `dartx`)
314+
### Build failed with `Unresolved reference: R`
315315

316-
For some reasons `dartx` or other packages may require a different version than yours. If you're facing this issue, and the error looks like:
316+
```groovy
317+
e: <path>\photo_manager-x.y.z\android\src\main\kotlin\top\kikt\imagescanner\core\PhotoManagerDeleteManager.kt: (116, 36): Unresolved reference: R
318+
e: <path>\photo_manager-x.y.z\android\src\main\kotlin\top\kikt\imagescanner\core\PhotoManagerDeleteManager.kt: (119, 36): Unresolved reference: createTrashRequest
319+
e: <path>\photo_manager-x.y.z\android\src\main\kotlin\top\kikt\imagescanner\core\PhotoManagerPlugin.kt: (341, 84): Unresolved reference: R
320+
e: <path>\photo_manager-x.y.z\android\src\main\kotlin\top\kikt\imagescanner\core\utils\Android30DbUtils.kt: (34, 34): Unresolved reference: R
321+
e: <path>\photo_manager-x.y.z\android\src\main\kotlin\top\kikt\imagescanner\core\utils\IDBUtils.kt: (27, 67): Unresolved reference: R
317322
323+
FAILURE: Build failed with an exception.
318324
```
319-
Because dartx >=0.2.0 <0.5.0 depends on collection >=1.14.11 <1.15.0 and every version of flutter from sdk depends on collection 1.15.0-nullsafety, dartx >=0.2.0 <0.5.0 is incompatible with flutter from sdk.
320-
So, because wechat_assets_picker_demo depends on both flutter any from sdk and dartx ^0.4.2, version solving failed.
321-
```
322-
323-
Please add the code below to make it work.
324325

325-
```yaml
326-
dependency_overrides:
327-
dartx: ^0.4.2
328-
```
326+
Run `flutter clean` first.
329327

330328
### How can I get path from the `AssetEntity` to integrate with `File` object, upload or edit?
331329

0 commit comments

Comments
 (0)