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

Expo EAS构建输出tar.gz而非APK问题求助

问题排查与解决

1. 检查eas.json的构建配置

打开项目根目录的eas.json,重点查看preview和production这两个profile的安卓配置项:

  • 输出tar.gz通常是因为构建类型被设为了App Bundle(.aab),EAS会把AAB包再打包成tar.gz提供下载;而你之前能生成APK,说明原配置是指定了buildType: "apk"
  • 确认你的配置里是否存在android.buildType字段,若当前是app-bundle,改为apk即可。

示例正确配置片段:

{
  "build": {
    "preview": {
      "android": {
        "buildType": "apk"
      }
    },
    "production": {
      "android": {
        "buildType": "apk"
      }
    }
  }
}

2. 排查Firebase集成引发的配置变更

添加Firebase时,可能修改了app.json/app.config.js里的安卓配置,比如开启了Google Play签名相关设置,这会让EAS默认切换到AAB格式构建:

  • 检查是否存在android.enableSigning: true或关联了Google Play App Signing的配置,若有,需要在eas.json里手动指定buildType: "apk"来覆盖默认行为。

3. 验证构建命令参数

确认执行构建时没有额外添加--local或其他改变输出格式的参数,eas build -p android --profile preview这类命令本身不会主动修改输出格式,问题核心还是配置文件。

4. 重新触发构建

修改完配置后,重新执行构建命令:

eas build -p android --profile preview
eas build --profile production --platform android

构建完成后应该会生成APK文件,而非tar.gz压缩包。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.18 19:22:04