gpt4 book ai didi

firebase - React native iOS 应用程序在导入 firebase crashlytics 后卡在启动屏幕上?

转载 作者:行者123 更新时间:2023-12-05 06:11:54 25 4
gpt4 key购买 nike

我已经在 React native 应用程序中实现了 crashlytics,如果我只单独导入 android 或 iOS 文件夹,它工作正常,但是当我在 .js 文件中导入 crashlytics 库时,iOS 应用程序会卡在启动屏幕上。

请提出解决此问题的方法或根本原因。

在 js 文件中导入以下库后,应用程序卡住了,否则应用程序运行正常

import crashlytics from '@react-native-firebase/crashlytics';

错误日志 enter image description here

package.json 如下

{
"name": "abc",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "react-native start",
"bundle-android": "react-native bundle --entry-file index.js --platform android --dev false --bundle-output ./android/app/src/main/assets/index.android.bundle --assets-dest ./android/app/src/main/res/",
"bundle-ios": "react-native bundle --entry-file index.js --bundle-output ./ios/bundle/index.ios.jsbundle --platform ios --assets-dest ./ios/bundle --dev false",
"test": "jest",
"ios": "react-native run-ios --simulator 'iPhone X'",
"android": "react-native run-android --variant=ProdDebug",
"android-ete": "ENVFILE=.env.ete react-native run-android --variant=EteDebug",
"ios-ete": "ENVFILE=.env.ete react-native run-ios",
"ios-prod": "ENVFILE=.env.prod react-native run-ios",
"exportcert-ete": "java -jar BKSPubKeyTool.jar --importkeystore keystore_ete.bks --alias oauth.testing --password keystorepwd --exportcert src/keystore/id_rsa_ete.pem --exportjs src/keystore/pubKey_ete.js",
"exportcert-prod": "java -jar BKSPubKeyTool.jar --importkeystore keystore.bks --alias oauth --password keystorepwd --exportcert src/keystore/id_rsa_prod.pem --exportjs src/keystore/pubKey_prod.js",
"lint": "eslint .",
"clean": "react-native-clean-project"
},
"dependencies": {
"@react-native-firebase/analytics": "^7.4.2",
"@react-native-firebase/app": "^6.0.0-alpha.25",
"@react-native-firebase/crashlytics": "^6.0.0-alpha.25",
"axios": "^0.19.0",
"buffer": "^5.2.1",
"crypto-js": "^3.1.9-1",
"jetifier": "^1.6.3",
"jsencrypt": "^3.0.0-rc.1",
"mobx": "^5.11.0",
"mobx-react": "^5.4.4",
"moment": "^2.24.0",
"native-base": "^2.12.1",
"prop-types": "^15.7.2",
"querystring": "^0.2.0",
"react": "16.8.6",
"react-native": "0.60.3",
"react-native-config": "^1.3.3",
"react-native-date-picker": "^2.7.3",
"react-native-device-info": "^2.2.2",
"react-native-exception-handler": "^2.10.8",
"react-native-gesture-handler": "^1.4.0",
"react-native-keyboard-spacer": "^0.4.1",
"react-native-linear-gradient": "^2.5.4",
"react-native-modal": "^11.1.0",
"react-native-modal-dropdown": "^0.6.2",
"react-native-picker-select": "^6.3.0",
"react-native-popup-dialog": "^0.18.2",
"react-native-reanimated": "^1.4.0",
"react-native-root-toast": "^3.1.2",
"react-native-screens": "^2.0.0-beta.10",
"react-native-scrollable-tab-view": "^0.10.0",
"react-native-splash-screen": "^3.2.0",
"react-native-sqlite-storage": "^3.3.11",
"react-native-tab-view": "^2.8.0",
"react-native-user-agent": "^1.0.4",
"react-native-user-inactivity": "^1.0.1",
"react-native-uuid": "^1.4.9",
"react-native-wheel-picker-android": "^2.0.5",
"react-navigation": "^3.11.1"
},
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/plugin-proposal-decorators": "^7.4.4",
"@babel/runtime": "^7.5.5",
"@react-native-community/eslint-config": "^0.0.5",
"babel-jest": "^24.8.0",
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"babel-preset-react-native": "^4.0.1",
"eslint": "^6.1.0",
"jest": "^24.8.0",
"metro-react-native-babel-preset": "^0.55.0",
"react-native-clean-project": "^3.4.0",
"react-test-renderer": "16.8.6"
},
"jest": {
"preset": "react-native"
}
}

最佳答案

正如我在错误日志中看到的,它有与 native 模块相关的错误。

So I hope your crashlytics module is not properly connected with youriOS Native Module, that's why it's stucked on splash screen as peryour explanation.

请将下面添加的 URL 代码与您的 Podfile 代码进行交叉检查,无论您的 crashlytic 和依赖的插件 pod 是否是它们的。

https://rnfirebase.io/crashlytics/usage/installation/ios

根据 crashlytics 插件安装指南中的说明,crashlytics 插件取决于核心 firebase 应用程序,因此请确认使用以下 URL,

https://rnfirebase.io/install-ios

我希望这能解决您的问题。

关于firebase - React native iOS 应用程序在导入 firebase crashlytics 后卡在启动屏幕上?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63750890/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com