Failed to create session.
An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of '/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.24.0.apk'. Original error: The JAVA_HOME environment variable must be set for Android Tools to work properly
根据报错提示,须要设置 JAVA_HOME 情况变量,具体步调为:
a. 下令行打开 ~/.bash_profile 文件:
vi ~/.bash_profileb. ~/.bash_profile 文件内按 i 进入编辑模式
c. 在 ~/.bash_profile 文件内增长内容:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-18.jdk/Contents/Homeexport PATH=$JAVA_HOME/binPATHexport CLASSPATH=$JAVA_HOME/lib此中 JAVA_HOME 的值须要读者自行在电脑上找到对应的文件夹;
d. 按键盘的 esc 按钮;
e. ~/.bash_profile 文件中输入如下文本并回车,完成生存;
:wq!