Why are my Android build artifacts missing in the Workflow Editor?

Last updated: October 15, 2026

Context

When using the Codemagic Workflow Editor, you may notice that your Android APK is successfully built but does not appear as an exported artifact. This typically happens when a Post-build script moves or renames the APK file after the build step completes.

Answer

In the Workflow Editor, artifacts are collected immediately after the build process finishes — before the Post-build script runs. This means that if your Post-build script moves or renames the APK, Codemagic has already "locked in" the original file paths for export. The renamed or relocated file will not be included in the artifacts.

There are two approaches to resolve this, depending on your needs:

  1. Remove the Post-build script that renames/moves the APK. Leave the APK at its default Flutter output path (e.g., build/app/outputs/flutter-apk/app-qa-release.apk). Codemagic will then find and export it correctly.

  2. Rename the APK using Gradle instead. If you need a custom file name (e.g., a versioned name like v1.2.3.apk), configure the output file name directly in your android/app/build.gradle file using Gradle's outputFileName property. Codemagic will detect the Gradle-generated file name, sign it, and export it successfully — without any Post-build script interference.

Note: Using cp (copy) instead of mv (move) in your Post-build script is not a reliable workaround in the Workflow Editor, since the artifact collection happens before the Post-build script runs regardless.

If you need full control over artifact renaming within the workflow itself (outside of Gradle), consider migrating your configuration to a codemagic.yaml file. Unlike the Workflow Editor, codemagic.yaml allows you to rename artifacts as part of the workflow steps before they are exported.