Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file

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

原始错误:java。lang.UnsupportedClassVersionError:com/android/apksigner/ApkSignerTool由最新版本的Java运行时(类文件版本53.0)编译,此版本的Java运行时仅识别高达52.0的类文件版本

An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of 'D:\Program Files\node-v10.15.3-win-x64\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.17.4.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
E       	at java.lang.ClassLoader.defineClass1(Native Method)
E       	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
E       	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
E       	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
E       	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
E       	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
E       	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
E       	at java.security.AccessController.doPrivileged(Native Method)
E       	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
E       	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
E       	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
E       	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
E       	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
E       Error: A JNI error has occurred, please check your installation and try again
E       Exception in thread "main" 
E           at getResponseForW3CError (D:\Program Files\node-v10.15.3-win-x64\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:804:9)
E           at asyncHandler (D:\Program Files\node-v10.15.3-win-x64\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:380:37)

解决方法:去Android的sdk目录下,删除30.0.0-preview目录即可

环境变量配置:%ANDROID_HOME%\build-tools\29.0.1(29.0.3 都行)

Android SDK 安装
新建环境变量:ANDROID_HOME 值为:F:\Andriod_SDK
在系统变量 Path 的值的前面加入以下内容:
%ANDROID_HOME%\platform-tools;
%ANDROID_HOME%\tools;%ANDROID_HOME%\tools;
%ANDROID_HOME%\build-tools\29.0.3 【这个29.0.3版本就行了,不能过高】
环境检测:在cmd命令终端输入:adb version

在这里插入图片描述

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值