简体   繁体   English

UI 测试 Xamarin 应用程序:System.Exception:未找到 Java 开发工具包 (JDK)

[英]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.

相关问题 在这台计算机上找不到 Java SE 开发工具包 (JDK) - Java SE Development Kit (JDK) was not found on this computer NetBeans 8.2安装程序未找到Java SE开发工具包(JDK) - Java SE Development Kit (JDK) was not found by NetBeans 8.2 Installer 关于带有JDK的Java EE 6开发套件捆绑包 - About Java EE 6 Development Kit Bundles with JDK JDK版本(Java开发工具包更新) - JDK version (Java Development Kit update) Visual Studio (xamarin) 错误“Xamarin.Android for Visual Studio 需要 Java 开发工具包 (JDK)。请点击此处进行配置。” 0 - Visual Studio (xamarin) error "Xamarin.Android for Visual Studio requires Java Development Kit (JDK). Please click here to configure." 0 Android Studio找不到Java Development Kit(JDK) - Android Studio doesn't find Java Development Kit (JDK) 在此计算机上找不到Java SE Development Kit - Java SE Development Kit not found on this computer 系统找不到指定的路径(Java开发工具包) - The system cannot find the path specified (Java Development Kit) Java运行时环境(JRE)或Java开发工具包(JDK)必须可用才能运行eclipse - Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run eclipse Eclipse for C ++要求提供Java Runtime Environment(JRE)或Java Development Kit(JDK) - Eclipse for C++ asks for Java Runtime Environment (JRE) or Java Development Kit (JDK)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM