react-native - 程序类型已存在 : io. invertase.firebase.BuildConfig

标签 react-native

基于一些谷歌搜索,似乎两个包之间存在一些重叠。我过去遇到过类似的问题,我想我可以用 ./gradlew clean 修复它,但这并不能解决我当前的问题。这是错误:

任务 ':app:transformDexArchiveWithDexMergerForDebug' 执行失败。

com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: Program type already present: io.invertase.firebase.BuildConfig



我开始遇到这个问题,因为我试图将 react-native-firebase 连接到我的应用程序中。以下是我的 package.json 文件中的一些相关依赖项:
"@react-native-firebase/app": "^6.0.3",
"@react-native-firebase/database": "^6.0.3",
"firebase-auth": "^0.1.2",
"react-native-firebase": "^5.5.6",

我是否需要卸载这些软件包之一,或者我是否可能在诸如 build.gradle、MainApplication.java 之类的文件中犯了接线错误?

最佳答案

一旦手动删除 ./node_modules/react-native-firebase 文件夹,
我能够成功运行: npx react-native run-android

我能够成功 react-native run-android

关于react-native - 程序类型已存在 : io. invertase.firebase.BuildConfig,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58646207/

相关文章:

react-native - 在 onSubmitEnding 时访问 TextInput 的文本

react-native - 由于 react 导航生成的键,Jest 快照测试失败

react-native - react native : How to add inline read more text to long truncated text

javascript - firebase 回调中无法识别异步函数

react-native - React Navigation Reset 可以加参数吗?

javascript - ComponentWillmount Fetch 返回 Null?

javascript - React-native Redux socket.io session 认证

javascript - React Native - 世博会 : fontFamily 'SimpleLineIcons' is not a system font and has not been loaded through Font. loadAsync

android - 升级到 0.60.4 后 React-native 版本不匹配

react-native - 不要将 React Native 元素中的禁用输入灰显