EAS build error: No such file or directory /android/app/build/outputs/bundle/release/owners-android-app.apk

Hi,

I have been using EAS build: Android to build our app prior to submitting to stores, and it has been working well. However in the last few days the build has been failing on the ‘Prepare artifacts’ step. All previous steps pass.

The error is:

There is no such file or directory "/build/workingdir/build/android/app/build/outputs/bundle/release/owners-android-app.apk". Directory "/build/workingdir/build/android/app/build/outputs/bundle/release" contains [app-release.aab].

No such file or directory /android/app/build/outputs/bundle/release/owners-android-app.apk

I have even tried to build a previous version of the app that successfully built only a week ago, but it failed in the same way. When it passed 2 weeks ago, the prepare artifacts step looked as follows:

Build artifacts: /build/workingdir/build/android/app/build/outputs/bundle/release/app-release.aab

My gut feeling was that it was the run gradelw step, however they both seem almost identical, ending in:

BUILD SUCCESSFUL in 5m 5s
745 actionable tasks: 745 executed

and

BUILD SUCCESSFUL in 9m 15s
726 actionable tasks: 726 executed

So nothing has changed in my code but the build now fails. I hope you can help.

Thanks in advance!

Are you using latest cli?
Do you have artifactPath specified in eas.json? (if yes then remove it)

It looks likes you are expecting apk but build produces aab, to build release apk you need to have buildType set to apk for managed projects or gradleCommand to :app:assembleRelease for bare projects