第 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) from [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 指定了替换,但没有指定新值。 ”
。
请帮忙!!