---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://ads.yandex.com/helpcenter/en/dev/react-native/react-native-errors.md
  - https://ads.yandex.com/helpcenter/ru/dev/react-native/react-native-errors.md
  - https://ads.yandex.com/helpcenter/zh/dev/react-native/react-native-errors.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ads.yandex.com/helpcenter/zh/llms.txt

# 可能的错误

## 插件集成错误 {#integration}

在集成 React Native 插件过程中，可能会遇到 Android 应用构建错误：

```java translate=no
/Users/AAAXXX/AX/reactapps/node_modules/react-native-camera/android/ build/intermediates/packaged_res/mlkitDebug/
values/values.xml:9:4: Duplicate value for resource 'attr/aspectRatio' with config 'DEFAULT' and product ''. 
Resource was previously defined here: com.aaaxxxgroupreactapps.app- mergeCentrepointDebugResources-84:/values/values.xml:10269: .
```

要修复错误：

1. 添加 [patch-package](https://www.npmjs.com/package/patch-package) 依赖项，并在 package.json 中的 postinstall 脚本中添加其执行命令。

2. 在项目根目录下创建一个 **patches** 文件夹，并将 [文件](https://doc-static.yandex.net/support/RSYA-RMP/react-native-camera_4.2.1.patch) 添加到其中。

