CI Runner failing intermittently when building Android builds

I am running an android task to create a build but my job intermittently fails. Most of the times the build is successful on the retry.
I run two build jobs parallely
a. /gradlew assembleVariant1
b. /gradlew assembleVariant2

The build fails with the error
Note: Some input files use unchecked or unsafe operations.

ERROR: Job failed: pod “runner-hyaiis6y-project-27788388-concurrent-2xgf2c” status is “Failed”

There is no clear error that is shown.

I am using Gitlab CI