Here is a tutorial on how to solve screen overlay detected issue on Android marshmallow mobile phones.
◆Goto safe mode in your mobile.
◆To goto safe mode simply press and hold power button until you see switch off,reboot options.
◆once you see the power off option,click and hold on it until you see a pop-up saying do you want to reboot to safe mode or similar to it.
◆click on yes and your phone will switch off and reboot to safe mode.
●Different mobiles have different key combination to enter safe mode●
◆Now you’re in safe mode right.,simply goto settings,apps,click on app which is saying screen overlay detected,Give all the permission to it.
◆This time it won’t say screen overlay detected.