How to get a rid from "Warning: Camera failed" error?
How to fix “Unfortunately, Camera has stopped” error on Galaxy J7
Step 1: Reboot your device 
Step 2: Restart your J7 in safe mode
Step 3: Clear the cache and data of the Camera app and other related apps
Step 4: Factory reset your Galaxy J7