[英]UI Tests Xamarin app : System.Exception : Java Development Kit (JDK) not found
I set my path to my JDK.我设置了我的 JDK 路径。 enter image description here
在此处输入图片说明
enter image description here在此处输入图片说明
But i have this message :但我有这个消息:
Message: System.Exception : Java Development Kit (JDK) not found.消息:System.Exception:未找到 Java 开发工具包 (JDK)。 Please make sure that it is installed and if it's still not located, please set the JAVA_HOME environment variable to point to the directory.
请确保它已安装,如果仍未找到,请将 JAVA_HOME 环境变量设置为指向该目录。
Searched locations:Windows Registry
[ Source: JAVA_HOME ]
When i try to use this :当我尝试使用它时:
public static IApp StartApp(Platform platform)
{
if (platform == Platform.Android)
{
return ConfigureApp.Android
.ApkFile("../JhipsterXamarin/JhipsterXamarin.Android/bin/Debug/com.companyname.jhipsterxamarin.apk")
.StartApp();
}
}
From the shared screenshot, you are using the custom downloaded JDK , not the downloaded JDK from Visual Studio.从共享的屏幕截图中,您使用的是自定义下载的JDK ,而不是从 Visual Studio 下载的JDK 。
Maybe the C:\\Program Files\\Java\\jdk1.8.0_271
can work when Visual Studio debug the project, however not works for UItest.也许
C:\\Program Files\\Java\\jdk1.8.0_271
在 Visual Studio 调试项目时可以工作,但不适用于 UItest。
Therefore, you could have a try with the generated path from Visual Studio:因此,您可以尝试使用 Visual Studio 生成的路径:
C:\\Program Files\\Android\\jdk\\microsoft_dist_openjdk_1.8.0.25
Screenshot of my local site:我的本地站点截图:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.