When I run the command uiautomatorviewer in the terminal, I get a JNI error
linh47 opened this issue · comments
Linh commented
uiautomatorviewer
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/uiautomator/UiAutomatorViewer has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
$ java -version
java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode)
culiverde commented
- Download any newer https://www.azul.com/downloads/?version=java-11-lts&package=jdk
- Add it to https://www.jenv.be/
jenv shell 11
Profit