I freshly installed appium setup in my laptop and while opening Uiautomatorviewer, it is shoing me the error’ A JNI error has occurred. Please check your administrator and try again’
When i click ‘OK’ there, then msg comes ‘A JAva exception has occurred’
UI automator is not capturing the screenshot of android mobile, showing message like
"Error obtaining UI hierarchy.
Reason : Unexpected error while obtaining UI hierarchy "
Device : Nokia 6.1
API : 27
Android version : 8.0.1
Tried all the solutions posted above, still not able to resolve this error.
Guys, please help me in this.
When I tried to launch the uiautomatorviewer . i am getting below error. I am trying on mac and using JAVA java 10.0.2 . Can you please some one help on the same?
Last login: Thu Aug 9 22:41:34 on ttys002
LBELALAD-M-91G4:~ lbelalad$ uiautomatorviewer
-Djava.ext.dirs=/Users/lbelalad/Library/Android/sdk/tools/lib/x86_64:/Users/lbelalad/Library/Android/sdk/tools/lib is not supported. Use -classpath instead.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Is there any workaround to this ?
Presently if the appium server is running, the UIAutomator cannot get the screenshot and page source from the device.
I think many of us would want the UIAutomator to work even if appium server is running, so that we can debug the code in Eclipse and also try different mechanisms.
This will reduce our effort.
Hello,
I’m facing issue related to screenshot inspecting. I have tried out above steps, it worked for me but I cannot find out proper element locator. Only Locators for outer screen is visible. Can u please let me know?