gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-05 03:23:56 25 4
gpt4 key购买 nike

我构建了 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 窗口,运行 adb logcat *:S ReactNative:V ReactNativeJS:V,并尝试打开崩溃的应用程序以查看崩溃时记录的内容。

我遇到的一个问题是 EAS 在构建过程中添加的一些依赖项存在问题,所以我安装了它 (react-native-reanimated@^2.8.0)分别通过 npm i,然后我的构建与 EAS 一起工作。

关于android - Expo EAS build android apk 在物理设备上崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72412416/

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