I discovered the real problem and consequently the solution.
Problem…
in fact I had one of the project’s layouts running straight from the debug variant.
Therefore, at the time of generating the production version (of the main variant) via Bitrise, the layout that was in the debug variant was not being found.
With Android Studio, apparently, it is okay to have files in different variants being referenced in any other variant than the original variant.
However for the CI / CD tool this is important (and obvious).
The solution: I migrated the layout file from the debug variant to the main variant (in my case there was no need to create a copy of the layout). So the build was successful.