【求助】appuim-desktop环境问题

问题一:
appuim-desktop安装成功,命令行输入appium,显示如下:
image
参考如下方式可解决:
Appium-Desktop配置命令行的启动方法_爻`的博客-CSDN博客_appium 命令行启动
问题二:
版本:1.21.0


点击start session后报错如下:

An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of ‘C:\Users\slp\AppData\Local\Temp\202246-16552-2j29zq.c1vz1\appium-uiautomator2-server-v4.21.1.apk’. Original error: java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) at java.net.URLClassLoader.access$100(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:368) at java.net.URLClassLoader$1.run(URLClassLoader.java:362) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:361) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495) Error: A JNI error has occurred, please check your installation and try again Exception in thread “main”
添加–automationName字段可解决
虽然拼拼凑凑解决了,但是不知道是什么原因导致的,很是疑惑,还希望老师指点指点!

你输入 jav-vsersionjavac -version 截图看看,怀疑是你本地有多个java版本

更新下java版本 升级到11试试

Java SE 6.0 = 50
Java SE 7 = 51
Java SE 8 = 52
Java SE 9 = 53
Java 10 = 54
Java 11 = 55
Java 12 = 56

更新到jdk11问题二解决了

image

问题1:你的Appium是怎么安装的呀,加-g了吗?npm install -g appium

从问题上看,你现在只安装了appium desktop
那么建议直接双击图标启动,不要配置环境变量来启动,把appium的命令留给server版本的,也就是修然老师说的npm 安装的appium

关闭