Righto. Have a look at the first step in your job output, where the Docker image is pulled. One of mine is like so:
Status: Downloaded newer image for docker/compose:1.20.1
using image docker/compose@sha256:f477b62c8634d15eee9c87b0dc2ea2d9f8f9246c97fbd187d4178dafaa11679a
The sha256 hash is like a “version” for the image. My thesis is that at the point your build broke, a new release for
circleci/android:api-28 had been made, probably upstream from CircleCI. To fix this, find the hash for the last working build, and specify that, e.g.
That is not an ideal fix, as it does not resolve the error, but at least it will get your builds working again.
From there, I would advise you to fix the error properly. How you do that is up to you, but the core issue is obviously that you are running out of memory. Standard containers have 4G of RAM, which should be enough for most purposes. I would advise looking into adjusting the RAM requirements of Java, which can be set by switches.
However, if you really cannot optimise your build, then you can add a
resource_class in your config for a larger container RAM limit (8G or 16G). You need to be on a paid plan for this, and I think you need to log a support ticket to enable the feature on your account.