为什么我在尝试向 Google Play 提交 Android 应用时收到错误“APK 不允许用于此应用程序”?

问题描述 投票:0回答:1

我正在尝试向 Google Play 提交我的应用程序,在成功构建后,当我运行

eas build -p android
时,出现以下错误:

[logs] Google Api Error: Invalid request - APKs are not allowed for this application. - Retrying...
[logs] Google Api Error: Invalid request - APKs are not allowed for this application. - Retrying...
[logs] Google Api Error: Invalid request - APKs are not allowed for this application. - Retrying...
[logs] Google Api Error: Invalid request - APKs are not allowed for this application. - Retrying...
[logs] Google Api Error: Invalid request - APKs are not allowed for this application. - Retrying...
[logs] [!] Google Api Error: Invalid request - APKs are not allowed for this application.
[logs] Fastlane supply failed
[logs] Failed to submit the app to the store
[logs] End phase: SUBMIT_TO_PLAY_STORE

我已经清理了我的 eas.json 文件,并且我只关注生产环境,所以它是这样的:

{
  "cli": {
    "version": ">= 5.9.1",
    "appVersionSource": "remote"
  },
  "build": {
    "development": {},
    "preview": {},
    "production": {
      "android": {
        "buildType": "app-bundle"
      }
    }
  }
}

我不知道如何强制使用 .aab 构建格式来更新我的应用程序。

尝试:

  • 更改eas.json
  • 清理缓存
  • 删除android文件夹,再次重建,看是否生成.aab

期望生成.aab以发送eas提交命令。

react-native expo google-play eas
1个回答
1
投票

这只是使

eas build -p android
生成 aab 的一个属性,applicationArchivePath:

    "build": {
    "development": {},
    "preview": {},
    "production": {
      "android": {
        "applicationArchivePath": "android/app/build/outputs/**/*.aab"
      }
    }
  }
© www.soinside.com 2019 - 2024. All rights reserved.