Gradle throws cannot find symbol error

CardholderRegistrationBean.java:1023: error: cannot find symbol
byte applicationDto = beneficiaryMemberApplicationDto.getNoCardProof();
^
symbol: method getNoCardProof()
location: variable beneficiaryMemberApplicationDto of type BeneficiaryMemberApplicationDto
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:compileJava’.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED