【发布时间】:2019-10-27 23:52:17
【问题描述】:
第 1 步:npm install react-native-image-picker
......应用程序仍在构建良好......
第 2 步:react-native 链接 react-native-image 选择器
...应用不再编译
当我清理 gradle 时出现错误: “无法将进程工作目录设置为 'C:\code\rn\xs\node_modules\react-native-image-picker\example\android':无法设置当前目录 (errno 3)”
当我尝试在 gradle 中重建时,我也会收到错误: “清单合并失败:属性 application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) 来自 [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 也存在于 [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory)。 建议:将 'tools:replace="android:appComponentFactory"' 添加到 AndroidManifest.xml:6:5-117 的元素以覆盖"。
所以我接受错误消息的建议并将'tools:replace="android:appComponentFactory"'添加到应用程序元素.....
我现在清理时仍然遇到同样的错误.....但是重建时的错误有点不同:
“工具:在第 10 行为属性 android:appComponentFactory 指定了替换,但没有指定新值。”
。
请帮忙!!
【问题讨论】:
-
您是否尝试在 build.gradle 和 npx jetify 上添加 supportLibVersion = "28.0.0"?
标签: react-native react-native-android react-native-image-picker