Updated on 2026-01-08 GMT+08:00

Signing Android APK

With the Sign Android APK action, use apksigner to sign the Android APK.

Graphical Build

  1. Add Sign Android APK after Build with Android, when configuring build actions.

    The parameters are described in the following table.

    Parameter

    Description

    Action Name

    Name of a build action. It can be customized.

    APK Location

    Location of the APK file to be signed generated after Android building. Regular expressions are supported. For example, build/bin/*.apk can be used to match the built APK package.

    Keystore File

    Keystore file used for signature, which is generated by referring to Generating Keystore Signature Files. Select a keystore file from the drop-down list of files already uploaded after you click Manage Files.

    Keystore Password

    Keystore password.

    Alias

    Alias of the keystore file.

    Key Password

    Password of the key.

    apksigner Command

    Custom signature parameter. By default, --verbose is added to display the signature details.

  2. Check whether the signing is successful.

    After the configuration is complete, run the build task. After the task is executed successfully, view the build log. If "Result: Signed" is displayed in the Android APK signature log, the signing is successful.

Code-based Build

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
version: 2.0 # The value must be 2.0.
steps:
  BUILD:
    - android_sign:
            inputs:
               file_path: build/bin/*.apk
                   keystore_file: androidapk.jks
                   keystore_password: xxxxxx
                   alias: keyalias
                   key_password: xxxxxx
                   apksigner_commond: --verbose

Parameter

Type

Description

Mandatory

Default Value

file_path

String

Directory of the APK that needed to be signed

Yes

None

keystore_file

String

Keystore file name

Yes

None

keystore_password

String

Keystore file password

No

None

alias

String

Alias

Yes

None

key_password

String

Password

No

None

apksigner_commond

String

apksigner command

Yes

None