Getting Unexpected Error while obtaining screenshot – java.lang.nullpointerexception

Issue

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.

Solution

Restarting the Android Studio worked for me.

It doesn’t give the screen capture error after I restarted Android studio.

Answered By – Nirali

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published