【发布时间】:2023-01-05 20:06:02
【问题描述】:
更新 expo 后,它不再支持使用构建 apk 文件博览会构建:android -t apk而是建议使用命令使用 eas 构建eas build -p android --profile 预览但它最终构建了一个 aab 而不是 apk。我查看了新添加的 eas.json 文件,其中包含:
{
"cli": {
"version": ">= 0.52.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {}
}
}
我阅读了 eas 文档,它建议将我的 eas.json 更改为:
{
"cli": {
"version": ">= 0.52.0"
},
"build": {
"preview": {
"android": {
"buildType": "apk"
}
},
"preview2": {
"android": {
"gradleCommand": ":app:assembleRelease"
}
},
"preview3": {
"developmentClient": true
},
"production": {}
}
}
运行构建命令后:eas build -p android --profile 预览
它将应用程序正确构建为 apk 文件并在 android 上安装得很好,但在打开时它会立即自行关闭。尝试重新打开后,它再次关闭,现在提醒应用程序崩溃。
我的 eas.json 文件中有错误还是我遗漏了什么?
【问题讨论】:
标签: javascript android node.js react-native expo