在三星m205f等手机上运行android时,应用程序debbug崩溃,没有任何错误



应用程序在调试模式下崩溃,在一些手机(如m205f(中没有错误,有些手机运行良好,我使用其他react原生应用程序,它也可以我的package.json我尝试了很多事情,但什么都没发生,仍然在debbug模式下崩溃apk运行良好,没有任何崩溃或异常

"依赖关系":{

"@craftzdog/pouchdb-core-react-native": "^7.0.0",
"@craftzdog/pouchdb-replication-react-native": "^7.0.0",
"@react-native-community/art": "^1.2.0",
"@react-native-community/async-storage": "^1.12.0",
"@react-native-community/blur": "^3.6.0",
"@react-native-community/masked-view": "^0.1.10",
"@react-native-community/netinfo": "^5.9.9",
"@react-native-community/push-notification-ios": "^1.5.0",
"@react-native-community/voice": "^1.1.9",
"@react-native-firebase/analytics": "^10.6.4",
"@react-native-firebase/app": "^10.8.1",
"@react-native-firebase/messaging": "^10.8.1",
"@react-navigation/bottom-tabs": "^5.9.2",
"@react-navigation/material-top-tabs": "^5.2.19",
"@react-navigation/native": "^5.7.5",
"@react-navigation/stack": "^5.9.2",
"axios": "^0.24.0",
"events": "^3.2.0",
"jalali-moment": "^3.3.10",
"lottie-react-native": "^3.5.0",
"moment": "^2.29.1",
"moment-jalaali": "^0.9.2",
"pouchdb-adapter-react-native-sqlite": "^2.0.0",
"pouchdb-find": "^7.2.2",
"react": "16.13.1",
"react-devtools": "^4.22.1",
"react-native": "^0.66.4",
"react-native-background-actions": "^2.6.5",
"react-native-barcode-mask": "^1.2.4",
"react-native-camera": "^3.44.3",
"react-native-chart-kit": "^6.6.1",
"react-native-circular-progress": "^1.3.6",
"react-native-device-info": "^7.3.1",
"react-native-exit-app": "^1.1.0",
"react-native-fast-image": "^8.3.4",
"react-native-fs": "^2.16.6",
"react-native-gesture-handler": "^1.10.3",
"react-native-image-crop-picker": "^0.35.2",
"react-native-image-picker": "^4.7.0",
"react-native-keyboard-aware-scroll-view": "^0.9.3",
"react-native-linear-gradient": "^2.5.6",
"react-native-modern-datepicker": "^1.0.0-beta.91",
"react-native-orientation-locker": "^1.4.0",
"react-native-paper": "^4.11.2",
"react-native-parsed-text": "^0.0.22",
"react-native-permissions": "^3.0.1",
"react-native-push-notification": "^8.1.1",
"react-native-qrcode-scanner": "^1.4.1",
"react-native-reanimated": "^1.13.3",
"react-native-restart": "^0.0.17",
"react-native-safe-area-context": "^3.1.8",
"react-native-screens": "^2.11.0",
"react-native-simple-gauge": "^0.3.0",
"react-native-size-matters": "^0.3.1",
"react-native-sound-player": "^0.10.5",
"react-native-splash-screen": "^3.2.0",
"react-native-sqlite": "^3.3.3",
"react-native-sqlite-2": "^3.1.1",
"react-native-star-rating": "^1.1.0",
"react-native-svg": "^12.1.0",
"react-native-tab-view": "^2.15.2",
"react-native-text-ticker": "^1.14.0",
"react-native-toast-message": "^2.1.1",
"react-native-vector-icons": "^7.1.0",
"react-native-video": "^5.1.0-alpha8",
"react-native-walk-counter": "^1.0.6",
"react-native-webview": "^11.0.2",
"react-native-wheel-pick": "^1.1.0",
"react-native-wheel-picker-android": "^2.0.6",
"react-redux": "^7.2.1",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"shamsi-date-converter": "^1.0.5",
"victory-native": "^36.2.0"

},

"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/runtime": "^7.11.2",
"@react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^26.3.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"eslint": "^7.10.0",
"jest": "^26.4.2",
"jetifier": "^1.6.6",
"metro-react-native-babel-preset": "^0.63.0",
"react-native-bundle-visualizer": "^2.2.1",
"react-native-svg-transformer": "^0.14.3",
"react-test-renderer": "16.13.1"

},

是否有库或依赖项导致崩溃

首先确保删除节点模块并重新安装,然后尝试以下命令

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/

我认为是由于react-native-reanimated包。他们的文档中提到,对于react native reanative来说,远程调试不再可能。

由于库使用JSI进行同步本机方法访问,因此无法再进行远程调试。您可以使用Flipper调试JS代码,但目前不支持将调试器连接到在UI线程上运行的JS上下文

参考:React Native Reanimated已知问题和限制

要使用Flipper,请参阅以下文档:使用Flipper 调试React Native应用程序

最新更新