You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Expo开发客户端Android端热重载及生产环境随机崩溃求助

Expo 开发客户端随机崩溃问题求助

我们的Expo开发客户端应用遇到了以下问题:

  • 执行hot reload时会随机崩溃,触发次数不固定,有时第2次就崩,有时要到第8次才会出现
  • 该问题不仅在开发环境存在,production环境也会发生
  • 通过Android Studio运行代码时可以看到Native Crash日志(崩溃时)和正常日志(未崩溃时),但Metro控制台完全没有报错信息,应用直接闪退

以下是项目的package.json配置:

{
  "name": "buebue",
  "version": "1.0.0",
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android --device",
    "ios": "expo run:ios --device",
     ...
  },
  "resolutions": {
    "promise": "^8.0.3"
  },
  "dependencies": {
    "@expo/ngrok": "^2.5.0",
    "@expo/vector-icons": "^13.0.0",
    "@freakycoder/react-native-bounceable": "^1.0.3",
    "@giphy/js-fetch-api": "^4.9.0",
    "@giphy/js-types": "^4.4.0",
    "@gorhom/bottom-sheet": "^4.5.0",
    "@miblanchard/react-native-slider": "^2.1.0",
    "@react-native-async-storage/async-storage": "1.18.2",
    "@react-native-community/datetimepicker": "7.2.0",
    "@react-native-community/netinfo": "9.3.10",
    "@react-native-community/slider": "4.4.2",
    "@react-native-cookies/cookies": "^6.2.1",
    "@react-native-picker/picker": "2.4.10",
    "@react-navigation/bottom-tabs": "^6.5.11",
    "@react-navigation/drawer": "^6.3.1",
    "@react-navigation/native": "^6.1.9",
    "@react-navigation/native-stack": "^6.9.17",
    "@react-navigation/stack": "^6.3.20",
    "@sentry/react-native": "5.5.0",
    "@shopify/flash-list": "^1.6.3",
    "@testing-library/react-native": "^9.0.0",
    "@tsconfig/react-native": "^3.0.2",
    "@types/papaparse": "^5.3.5",
    "@types/styled-components-react-native": "^5.2.1",
    "axios": "^0.24.0",
    "cheerio": "^1.0.0-rc.12",
    "double-click-react-native": "^0.1.8",
    "expo": "49.0.18",
    "expo-application": "~5.3.0",
    "expo-auth-session": "4.1.0",
    "expo-barcode-scanner": "~12.5.3",
    "expo-build-properties": "~0.8.3",
    "expo-camera": "~13.4.4",
    "expo-constants": "~14.4.2",
    "expo-device": "~5.4.0",
    "expo-document-picker": "~11.5.4",
    "expo-fast-image": "^1.1.3",
    "expo-file-system": "~15.4.4",
    "expo-firebase-analytics": "^8.0.0",
    "expo-font": "~11.4.0",
    "expo-image-picker": "~14.3.2",
    "expo-in-app-purchases": "~14.3.0",
    "expo-linking": "~5.0.2",
    "expo-notifications": "~0.20.1",
    "expo-print": "~12.4.2",
    "expo-random": "~13.2.0",
    "expo-sharing": "~11.5.0",
    "expo-splash-screen": "~0.20.5",
    "expo-status-bar": "~1.6.0",
    "expo-updates": "~0.18.17",
    "expo-web-browser": "~12.3.2",
    "git": "^0.1.5",
    "htmlparser2": "^9.0.0",
    "jest": "^29.2.1",
    "jest-expo": "^47.0.0",
    "lottie-react-native": "5.1.6",
    "missing-dimension-strategy-expo-config-plugin": "^0.0.5",
    "papaparse": "5.4.1",
    "query-string": "^7.1.1",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.72.6",
    "react-native-circular-progress-indicator": "^4.4.2",
    "react-native-confirmation-code-field": "^7.3.0",
    "react-native-dashed-line": "^1.1.0",
    "react-native-dotenv": "^3.3.1",
    "react-native-dropdown-picker": "^5.4.0",
    "react-native-element-dropdown": "^2.3.0",
    "react-native-fast-image": "^8.6.3",
    "react-native-fit-image": "^1.5.5",
    "react-native-flash-message": "^0.3.1",
    "react-native-gesture-handler": "~2.14.0",
    "react-native-get-random-values": "~1.9.0",
    "react-native-iap": "^12.10.7",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-markdown-display": "^7.0.0-alpha.2",
    "react-native-paper": "^4.12.0",
    "react-native-paper-dates": "^0.18.1",
    "react-native-pell-rich-editor": "^1.9.0",
    "react-native-reanimated": "~3.3.0",
    "react-native-render-html": "^6.3.4",
    "react-native-root-siblings": "^4.1.1",
    "react-native-root-toast": "^3.4.0",
    "react-native-safe-area-context": "4.6.3",
    "react-native-screens": "~3.22.0",
    "react-native-super-grid": "^5.0.0",
    "react-native-svg": "13.9.0",
    "react-native-swipe-gestures": "^1.0.5",
    "react-native-toast-message": "^2.1.1",
    "react-native-vector-icons": "^9.2.0",
    "react-native-web": "~0.19.6",
    "react-native-webview": "13.2.2",
    "react-native-youtube-iframe": "^2.2.2",
    "react-query": "^3.39.2",
    "react-test-renderer": "^17.0.2",
    "sentry-expo": "~7.0.0",
    "truncate-html": "^1.0.4"
  },
  "devDependencies": {
    "@babel/core": "^7.19.3",
    "@babel/preset-typescript": "^7.16.7",
    "@types/jest": "^27.4.1",
    "@types/react": "~18.2.14",
    "@types/react-native": "~0.70.6",
    "@types/react-test-renderer": "^17.0.1",
    "@typescript-eslint/eslint-plugin": "^6.6.0",
    "@typescript-eslint/parser": "^6.6.0",
    "babel-plugin-inline-import": "^3.0.0",
    "dotenv-cli": "^5.1.0",
    "eslint": "^8.2.0",
    "eslint-config-airbnb": "19.0.4",
    "eslint-config-prettier": "^8.3.0",
    "eslint-plugin-import": "^2.25.3",
    "eslint-plugin-jsx-a11y": "^6.5.1",
    "eslint-plugin-prettier": "^4.0.0",
    "eslint-plugin-react": "^7.33.2",
    "eslint-plugin-react-hooks": "^4.3.0",
    "husky": "^8.0.3",
    "lint-staged": "11.1.4",
    "prettier": "^2.5.1",
    "typescript": "^5.1.3"
  },
  "private": true,
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  }
}

有没有其他开发者遇到过类似问题?


内容的提问来源于Stack Exchange,提问作者Matko Setnik

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.04 13:22:16