yogevabergel [~/Library/Android/sdk/tools/bin] $ ./uiautomatorviewer
-Djava.ext.dirs=/Users/yogevabergel/Library/Android/sdk/tools/lib/x86_64:/Users/yogevabergel/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.
Any help? Nothing in the internet about it.
First, check you set properly system variables like JAVA_HOME & ANDROID_HOME and that tools are in place, easy way is to use appium-doctor
for this:
npm appium-doctor -g
appium-doctor --android
And fix any error you get.
It can be also that you miss some component in android-sdk-tools:
Configure
=> SDK manager
Which java version are you running? I hit the same issue with Java v.10, installed Java v.8, updated ~/.bash_profile with
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
and it helped.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.