"The website encountered an unexpected error. Please try again later." error show on cache clear My Drupal 8 site is working fine but when I am clearing the cache then my site display below errors.


  
    The website encountered an unexpected error. Please try again later.
  


Please suggest me what is the problem ?  I have checked status report and it shows the error below
I was also getting the same error. The reason is given in the error message,i.e. Drupal is not able to find the specified controller. In my case, in the routing yml, the controller's path is "hello_world\Controller\HelloController", whereas my HelloController.php file was contained in the hello_world\src folder instead of the required path (**hello_world\src\Controller** folder).

My hello_world.routing.yml contents

hello_world.content:
 path: '/hello'
defaults:
 _controller: '\Drupal\hello_world\Controller\HelloController::content'
_title: 'Hello World'
requirements:
_permission: 'access content'