How do i fix the problem "screen overlay detected"?

Since Android 6.0 you can assign each authorization individually. If you use an app with screen overlay there will appear a pop-up reading “screen overlay detected“ when the access to the authorisation is confirmed. In that case you have to deactivate it.

This is due to the version of the operating system (since Marshmallow). Here is how you can solve the problem.