Flutter command works locally but not on Github Actions

Viewed 22

I have a problem where a command that works on my local machine isn't working on GitHub Actions.

The command I'm using on my local machine is:

flutter build appbundle --obfuscate --split-debug-info=build/app/outputs/ --flavor Production --dart-define="ENVIRONMENT=PRODUCTION"

This command exists in the yml. If I change it to flutter build apk then it works with no problem.

However, when trying to build the aab I get the error:

Gradle build failed to produce an .aab file. It's likely that this file was generated under /home/runner/work/{project-name}/{project-name}/build, but the tool couldn't find it.

I'm not sure why it's put the project name in there twice, and I don't know if it's the cause or it's what it's supposed to be.

When I looked up the error I found people saying it's because I didn't specify the flavour. Clearly I have specified the flavour, so I'm confused as to what's happening.

0 Answers
Related