I am getting below error while capturing screenshot in Android Studio 2.0. I tried with 2 different tablets and with both of them I am getting this error.
Unexpected Error while obtaining screenshot - java.lang.Nullpointerexception
I have googled and also looked at different stackoverflow questions but didnt found any which can resolve this issue.
I have recently installed Android Studio 2.0 and this could be a problem I dont know.
Restarting the Android Studio worked for me.
It doesn’t give the screen capture error after I restarted Android studio.
Answered By – Nirali