Android not building (apk file not found) after BUILD SUCCESSFULL

The appflow made the build successfull ,
but it seems that it looks for a generic path and does not finish de processing
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
[12:48:52]: ▸ Use ‘–warning-mode all’ to show the individual deprecation warnings.
[12:48:52]: ▸ See Command-Line Interface
[12:48:52]: ▸ BUILD SUCCESSFUL in 6m 15s
[12:48:52]: ▸ 655 actionable tasks: 655 executed
[12:48:53]: -------------------------
[12:48:53]: — Step: upload_logs —
[12:48:53]: -------------------------
[12:48:59]: Unable to upload npm package list log. Skipping.
±------------------------------------±-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Lane Context |
±------------------------------------±-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | android |
| LANE_NAME | android package_build |
| PROJECT_WEB_DIR | www |
| DOWNLOAD_CREDENTIAL_EXISTS | false |
| GRADLE_ALL_APK_OUTPUT_PATHS | ["/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/delcomDemo/debug/app/build/outputs/apk/debug/app-debug.apk", “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/delcomStaging/debug/app-delcomStaging-debug.apk”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/delftProd/debug/app-delftProd-debug.apk”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/leidenProd/debug/app-leidenProd-debug.apk”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/rugProd/debug/app-rugProd-debug.apk”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/sportstickerProd/debug/app-sportstickerProd-debug.apk”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/studioProd/debug/app-studioProd-debug.apk”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/tueProd/debug/app-tueProd-debug.apk”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/twenteProd/debug/app-twenteProd-debug.apk”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/uaProd/debug/app-uaProd-debug.apk”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/uvaProd/debug/app-uvaProd-debug.apk”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/uvtProd/debug/app-uvtProd-debug.apk”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/vuProd/debug/app-vuProd-debug.apk”] |
| GRADLE_ALL_AAB_OUTPUT_PATHS | ["/builds/delcom-dev/scan-access-app/android/app/build/outputs/bundle/delcomDemoDebug/app-delcomDemo-debug.aab", “/builds/delcom-dev/scan-access-app/android/app/build/outputs/bundle/delcomStagingDebug/app-delcomStaging-debug.aab”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/bundle/delftProdDebug/app-delftProd-debug.aab”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/bundle/leidenProdDebug/app-leidenProd-debug.aab”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/bundle/rugProdDebug/app-rugProd-debug.aab”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/bundle/sportstickerProdDebug/app-sportstickerProd-debug.aab”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/bundle/studioProdDebug/app-studioProd-debug.aab”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/bundle/tueProdDebug/app-tueProd-debug.aab”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/bundle/twenteProdDebug/app-twenteProd-debug.aab”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/bundle/uaProdDebug/app-uaProd-debug.aab”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/bundle/uvaProdDebug/app-uvaProd-debug.aab”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/bundle/uvtProdDebug/app-uvtProd-debug.aab”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/bundle/vuProdDebug/app-vuProd-debug.aab”] |
| GRADLE_ALL_OUTPUT_JSON_OUTPUT_PATHS | ["/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/delcomDemo/debug/output-metadata.json", “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/delcomStaging/debug/output-metadata.json”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/delftProd/debug/output-metadata.json”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/leidenProd/debug/output-metadata.json”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/rugProd/debug/output-metadata.json”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/sportstickerProd/debug/output-metadata.json”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/studioProd/debug/output-metadata.json”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/tueProd/debug/output-metadata.json”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/twenteProd/debug/output-metadata.json”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/uaProd/debug/output-metadata.json”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/uvaProd/debug/output-metadata.json”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/uvtProd/debug/output-metadata.json”, “/builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/vuProd/debug/output-metadata.json”] |
| GRADLE_ALL_MAPPING_TXT_OUTPUT_PATHS | |
| GRADLE_APK_OUTPUT_PATH | /builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/vuProd/debug/app-vuProd-debug.apk |
| GRADLE_AAB_OUTPUT_PATH | /builds/delcom-dev/scan-access-app/android/app/build/outputs/bundle/vuProdDebug/app-vuProd-debug.aab |
| GRADLE_OUTPUT_JSON_OUTPUT_PATH | /builds/delcom-dev/scan-access-app/android/app/build/outputs/apk/vuProd/debug/output-metadata.json |
12:49:01]: apk file android/app/build/outputs/apk/debug/app-debug.apk not found

±-----±------------------------±------------+
| fastlane summary |
±-----±------------------------±------------+
| Step | Action | Time (in s) |
±-----±------------------------±------------+
| 1 | default_platform | 0 |
| 2 | build_summary | 0 |
| 3 | add_git_credentials | 0 |
| 4 | get_appflow_config | 0 |
| 5 | detect_native_type | 0 |
| 6 | dependency_install | 37 |
| 7 | create_capacitor_config | 0 |
| 8 | get_web_dir | 0 |
| 9 | set_java_home | 0 |
| 10 | modify_cap_web_config | 0 |
| 11 | download_credential | 0 |
| 12 | build_pro_app | 105 |
| 13 | cap_sync | 1 |
| 14 | cap_custom_deploy | 0 |
| :boom: | build_android_capacitor | 376 |
| 16 | upload_logs | 7 |
±-----±------------------------±------------+

/usr/local/bundle/bin/fastlane: [!] apk file android/app/build/outputs/apk/debug/app-debug.apk not found (RuntimeError)
[12:49:01]: fastlane finished with errors

Any fix for this?

Getting a similar issue on 2020 06 build

[16:17:29]: ▸ BUILD SUCCESSFUL in 2m 11s

[16:17:34]: Shell command exited with exit status 1 instead of 0.

/usr/local/bundle/bin/fastlane: [!] Shell command exited with exit status 1 instead of 0. (FastlaneCore::Interface::FastlaneShellError)

Any way to get better logs? Is there an outage?

I believe this is correct. Appflow expects the name of the .apk file to be app-{build_type}.apk where {build_type} will either be debug or release depending on what was selected when starting a new Appflow build.

Additionally, Appflow expects to find the .apk file at ./android/app/build/outputs/apk/{build_type} for Capacitor projects.

Because of this restriction, android product flavors are not currently supported within Appflow. However, I believe the Appflow team has plans to implement this feature since Capacitor projects can be configured to use product flavors.

1 Like