Help Center/ CodeArts Build/ FAQs/ Android Builds/ How Do I Fix the Android APK Signing Failure?
Updated on 2024-10-10 GMT+08:00

How Do I Fix the Android APK Signing Failure?

Symptoms

A signature error is reported during a build with Android.

The error information includes Execution failed for task ':app:validateSigningDebug or Execution failed for task ':app:validateSigningRelease.

Solution

During Android builds, you are advised to use the Android APK signature build action to sign the APK. CodeArts Build provides the Android APK signature build action. The configuration method is as follows:

  1. Add the action Sign Android APK after Build with Android.

    The parameters are described in the following table.

    Parameter

    Description

    APK Directory

    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. Click the drop-down list box to display the Keystore files uploaded on the Files page. Select a file as required.

    Keystore Password

    Keystore password.

    Alias

    Alias of the keystore file.

    Key Password

    Key password.

    apksigner CLI

    Custom signature parameter. The default value is --verbose.

  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.