Expo EAS build android apk 在物理设备上崩溃

Expo EAS build android apk crash on physical device

我建造了 eas -p android --profile luna。然后,我下载到物理设备。打开它时,应用程序在显示启动画面后崩溃。世博会 SDK 45.0.0。
我试图更改 eas.json 配置文件。这是我试过的。

"luna": {
  "android": {
    "buildType": "apk",
    "distribution": "internal"
  }
}

"luna": {
  "android": {
    "buildType": "apk",
    "distribution": "internal",
    "gradleCommand": ":app:assembleRelease"
  }
}

"luna": {
  "android": {
    "buildType": "apk"
  }
},

"luna": {
  "android": {
    "buildType": "apk",
    "developmentClient": true
  }
},

DevelopmentClient 一个可以打开,但是打不开我想要的那个。
有人可以告诉或指导或建议我

  1. 如何使用eas为物理设备构建apk
  2. 我应该降级到 Expo SDK 44.0.0 并使用 expo build:android 吗?
  3. 如何在没有 expo 的情况下为物理设备创建 apk(比如弹出 expo)
  4. expo build 经典版本将被完全删除。我将来应该在没有 expo 的情况下构建 react-native 应用程序吗?

我的 package.json 文件。

 "dependencies": {
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/datetimepicker": "6.1.2",
    "@react-native-community/netinfo": "8.2.0",
    "@react-native-masked-view/masked-view": "0.2.6",
    "@react-navigation/material-top-tabs": "^6.2.1",
    "@react-navigation/native": "^6.0.10",
    "@react-navigation/stack": "^6.2.1",
    "expo": "~45.0.0",
    "expo-splash-screen": "~0.15.1",
    "expo-sqlite": "~10.2.0",
    "expo-status-bar": "~1.3.0",
    "firebase": "^9.8.1",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-native": "0.68.2",
    "react-native-collapsible": "^1.6.0",
    "react-native-gesture-handler": "~2.2.1",
    "react-native-modal-datetime-picker": "^13.1.2",
    "react-native-pager-view": "5.4.15",
    "react-native-safe-area-view": "^1.1.1",
    "react-native-screens": "~3.11.1",
    "react-native-svg": "12.3.0",
    "react-native-web": "0.17.7",
    "victory-native": "^36.4.1",
    "expo-dev-client": "~0.9.6"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@types/react-native": "^0.67.7",
    "babel-plugin-root-import": "^6.6.0"
  },

您可以尝试记录您的错误。我建议您采取的第一步是将您的设备(启用 USB 调试)连接到您的 PC,转到安装 adb 的位置,在该文件夹中打开 CMD/PowerShell window , 运行 adb logcat *:S ReactNative:V ReactNativeJS:V, 并尝试打开崩溃的应用程序以查看崩溃时记录的内容。

我遇到的一个问题是 EAS 在构建期间添加的某些依赖项存在问题,因此我通过 npm i 单独安装它 (react-native-reanimated@^2.8.0),然后我的构建与 EAS 兼容。