Try Safe Mode. If no go, try a general Cached Data clear in Settings, Storage, followed by a Power Off and Restart. If no go, the camera may have failed.
Yes, a few judicious smart slaps might do it....and may also fix a camera which will not focus correctly. The problem is in the interpretation of "judicious".
To the OP--do you have any 3rd party flashlight apps installed? Flashlight apps control the Camera, since the flash LED is part of the camera, and sometimes these 3rd party flashlight apps are glitchy, preventing the camera itself from functioning.