简体   繁体   English

Sikuli屏幕构造函数给出错误:无法设置类型屏幕

[英]Sikuli Screen constructor giving error :Cannot instatiate the type screen

Sikuli dependency version in maven is: maven 中的 Sikuli 依赖版本是:

<dependency>
    <groupId>org.sikuli</groupId>
    <artifactId>sikuli-api</artifactId>
    <version>1.2.0</version>
</dependency>

I am trying to do coding for image comparison using Sikuli API but getting error on:我正在尝试使用 Sikuli API 进行图像比较编码,但出现错误:

Screen s =new Screen();

even though Screen() constructor does exist for Screen class in Sikuli.尽管 Sikuli 中的Screen类确实存在Screen()构造函数。

在此处输入图片说明

在此处输入图片说明

Please try this instead:请试试这个:

<repositories>
    <repository>
      <id>snapshot</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>com.sikulix</groupId>
      <artifactId>sikulixapi</artifactId>
      <version>2.0.0-SNAPSHOT</version>
    </dependency>
  </dependencies>

I think what you are using point to another project.我认为您正在使用的内容指向另一个项目。

Go to https://jar-download.com/?search_box=sikuli and download the jar.转到https://jar-download.com/?search_box=sikuli并下载 jar。 Create java project and add build path.创建java项目并添加构建路径。

Please try the following:请尝试以下操作:

<dependency>
  <groupId>com.sikulix</groupId>
  <artifactId>sikulixapi</artifactId>
  <version>2.0.4</version>
</dependency>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Sikuli 通过 Jenkins 在屏幕上找不到图像 - Sikuli cannot find image on screen through Jenkins Sikuli screen.wait无法正常工作 - Sikuli screen.wait not working 如何使用Sikuli Java API声明屏幕(不是Sikuli脚本) - How to assert a screen with Sikuli java API(Not Sikuli script) Sikuli仅在主屏幕上识别图像 - Sikuli recognizes images on the main screen only 拍摄sikuli中特定区域的屏幕快照以获取Eclipse图形用户界面 - take screen shot of a specific area in sikuli for eclipse gui vlcj:屏幕多路分配错误:无法创建位图 - vlcj: Screen demux error: Cannot create bitmap 给定类型的构造函数错误,无法应用 - Constructor error with given type, cannot be applied 当屏幕上存在两个完全相同的图像时,如何通过使用Sikuli和Java从屏幕上单击图像 - how to click an image from the screen by using Sikuli with java when there are two exact identical images present in the screen 错误:不能对构造函数使用带有显式类型参数的原始构造函数引用 - Error: cannot use raw constructor reference with explicit type parameters for constructor 如何使用 Sikuli(Java) 从屏幕上的特定位置获取值? - How do I get a value from a particular location on screen using Sikuli(Java)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM