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

React Native Expo构建APK成功但安卓设备安装后立即崩溃求助

Expo Android Preview构建APK安装后立即崩溃(Expo Go运行正常)

使用命令eas build -p android --profile preview成功构建安卓APK,但安装到真机后启动即崩溃。我尝试基于全新Expo项目重建,仅添加少量页面,问题依旧存在。

应用在Expo模拟器、真机上的Expo Go环境中运行完全正常,仅构建为APK安装到真机后出现崩溃。通过logcat监控设备日志,仅获取到以下无明确代码错误线索的日志:

08-23 15:22:29.036  6078  6130 E AndroidRuntime: Process: com.oki.okieventapp, PID: 6078
08-23 15:22:29.055  1173  6146 W ActivityManager: crash : com.oki.okieventapp,10352
08-23 15:22:29.058  1173  1259 W ActivityTaskManager:   Force finishing activity com.oki.okieventapp/.MainActivity

我的package.json内容:

{
  "name": "eventapp0828",
  "version": "1.0.0",
  "main": "expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@react-navigation/bottom-tabs": "^6.6.1",
    "@react-navigation/native": "^6.1.17",
    "@react-navigation/native-stack": "^6.9.26",
    "@react-navigation/stack": "^6.3.29",
    "contentful": "^10.8.7",
    "expo": "~51.0.28",
    "expo-status-bar": "~1.12.1",
    "react": "18.2.0",
    "react-native": "0.74.5"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0"
  },
  "private": true
}

app.json内容:

{
  "expo": {
    "name": "Oki Event App",
    "slug": "eventieapp",
    "version": "1.0.4",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "light",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "com.oki.okieventapp"
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/splash.png",
        "backgroundColor": "#ffffff"
      },
      "package": "com.oki.okieventapp",
      "versionCode": 8
    },
    "web": {
      "favicon": "./assets/splash.png"
    }
  }
}

恳请各位帮忙排查解决这个崩溃问题,感谢!🥹

内容的提问来源于stack exchange,提问作者Haodan Jing

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.19 05:38:20