可能的错误
插件集成错误
在集成 React Native 插件时,您可能会遇到以下 Android 构建错误:
/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: .
以下是具体修复方式:
-
添加 patch-package 依赖项,并在 package.json 中将其作为 postinstall 脚本调用。
-
在项目根目录中创建 patches 文件夹,并向其添加文件。
这篇文章是否有用?
上一篇
下一篇