如何通过Fastlane创建aab(捆绑包)?

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

我想通过

aab
创建
Fastlane
(捆绑包),但到目前为止我只能创建
apk
,现在这是我的
lane
,如何创建aab?

 lane :beta do
    store_password = prompt(text: "Signing Store Password: ", secure_text: true)
    key_password = prompt(text: "Alias Key Password: ", secure_text: true)
    releaseFilePath = File.join(Dir.pwd, "..", "my-release-key.keystore")
    gradle(task: 'clean')
    gradle(
      task: 'assemble',
      build_type: 'Release',
      print_command: false,
      properties: {
        "android.injected.signing.store.file" => releaseFilePath,
        "android.injected.signing.store.password" => store_password,
        "android.injected.signing.key.alias" => "my-key-alias",
        "android.injected.signing.key.password" => key_password,
      }
    )
    upload_to_play_store(
      track: 'internal'
    )
android google-play react-native fastlane
3个回答
33
投票

task
assemble
更改为
bundle
,解决了我的问题!


3
投票

创建签名的 Android App Bundle(aab) 发布文件,然后发送到 Google Play 并自动发布到生产环境。

运行:fastlane build_aab --verbose

  lane :build_aab do
      gradle(task: 'clean')
      gradle(
        task: 'bundle',
        build_type: 'Release',
        print_command: true,
        properties: {
          "android.injected.signing.store.file" => "loca_file_system/store_file.jks",
          "android.injected.signing.store.password" => "********",
          "android.injected.signing.key.alias" => "your_signing_key",
          "android.injected.signing.key.password" => "********",
        }
      )
      upload_to_play_store(
          track:'production',
          skip_upload_metadata: true,
          skip_upload_images: true,
          skip_upload_screenshots: true)
  end

1
投票

在尝试构建 aab 文件之前,不要忘记运行 “fastlane Supply init” 并设置您的 Google Developers 服务帐户,否则无法与 google play console 连接。

© www.soinside.com 2019 - 2024. All rights reserved.