Search code examples
pythonappiumui-automation

Couldn't open uiautomatorviewer after setting PATH


Today I followed the Youtube for setting my laptop(linux-Debian) to install the android SDK tool , I have set PATH in environment variables via command line [terminal line]:

hauying@hauying-yoga-linux:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/hauying/Android/tools:/home/hauying/Android/platform-tools

After setting the PATH successfully, I can't open "uiautomatorviewer". It shows following error when I try to open it: [terminal line]:

hauying@hauying-yoga-linux:~/Andriod/tools/bin$ '/home/hauying/Andriod/tools/bin/uiautomatorviewer' 
-Djava.ext.dirs=/home/hauying/Andriod/tools/lib/x86_64:/home/hauying/Andriod/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.

I tried using command -classpath ,but it can't find this command.

How can I open my "uiautomatorviewer". Please help.


Solution

  • Please try the instructions on below websites. These might help resolve the issue:

    1. https://sansatechnology.wordpress.com/2017/11/20/how-to-fix-appium-uiautomatorviewer-issue/
    2. Workaround: https://discuss.appium.io/t/uiautomatorviewer-throws-error/11620/15