uiautomator viewer error while trying to take the screenshot of the emulator screen or either the device connected

1.9k views Asked by At

Anyone can please provide me a better solution for the errors I am mentioning down.As i have already tried so many solutions from every possible website. Refer the image and please help me with the solution

2

There are 2 answers

0
Santhosh Kumar On

Check if you have an active Appium connection to the device. When you have an active Appium connection to your device / emulator, it will lock the ui-automator resources. So you will not be able to take a snapshot at that time.

0
bsk On

Can you make sure you run below commands from terminal before taking screenshots.

adb root
adb remount

This fixed the issue for me. Also make sure a test is not already running on the device.