无法构建与 firebase 版本不兼容的原因,并且相机反应本机

这是我使用的:


"react": "16.8.3",

"react-native": "0.59.10",

"react-native-camera": "3.3.0",

"react-native-firebase": "5.5.6"

我需要react-native-camera扫描条形码,但是当我尝试添加react-native-firebase但无法构建时。但是,它只是在 Android 上失败,在 IOS 上运行得很好。


这就是我尝试解决的问题:

1. 重新安装软件包 RNFirebase 并使用自动或手动重新链接该软件包

2. 我尝试将其添加到 gradle.properties


android.useAndroidX=true

android.enableJetifier=true

我尝试过降级版本,但没有帮助。

我也尝试在清单中添加此内容,但它给了我更多错误重复。

tools:replace="android:appComponentFactory"

android:appComponentFactory="whateverString"

这是终端上所说的错误:

  • 出了什么问题:任务“:app:processDebugManifest”执行失败。

    清单合并失败: [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 中的属性 application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) 也存在于 [com.android.support :support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory)。建议:将 'tools:replace="android:appComponentFactory"' 添加到 AndroidManifest.xml:7:5-117 的元素中进行覆盖。

我希望用相机和 Firebase 构建 React-Native。

我也向社区询问过,但还没有答案。 https://github.com/react-native-community/react-native-camera/issues/2486


撒科打诨
浏览 88回答 1
1回答

杨__羊羊

尝试升级react-native-camera,我正在使用 3.11.1 和 firebase 5.5.6,一切正常
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java