Oracle Solution for Error ora-42311

Solution for Oracle Error ORA-42311

ORA-42311: This operation is only permitted on views with compilation erros

What triggered the Error:

ALTER VIEW READ ONLY and ALTER VIEW READ WRITE is not permitted on views which has compilation errors.

What should we do to fix it:

Resolve the compilation errors.