UI Automator is showing black screen while taking the screenshot in UI automator what could be the reason for that ...please help me out?

While taking the screen shot with the help of UI automator it is displaying the Black screen …

Try it :-