← Back to team overview

sikuli-driver team mailing list archive

[Question #626490]: Errors happen when Android screen is horizontal

 

New question #626490 on Sikuli:
https://answers.launchpad.net/sikuli/+question/626490

Hi, Sir, first of all, thanks for developing this amazing SikuliX !

    I get an error when I try to control my android phone by SikuliX-java. These are my codes:

 public class Test {
	public static void main(String[] args) throws FindFailed {
		System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
		ADBScreen android=new ADBScreen();
		 android.click("imgs/5.png");
	}
}

When the android screen is vertical, the codes work fine. But when screen is horizontal, below error happens:

[error] ADBDevice: captureDeviceScreenMat: width or height differ from device values
Exception in thread "main" java.lang.NullPointerException: Attempt to dereference null cv::Mat
	at org.sikuli.natives.VisionProxyJNI.FindInput_setSource__SWIG_1(Native Method)
	at org.sikuli.natives.FindInput.setSource(FindInput.java:81)
	at org.sikuli.script.Finder.setScreenImage(Finder.java:164)
	at org.sikuli.script.Finder.initScreenFinder(Finder.java:131)
	at org.sikuli.script.Finder.<init>(Finder.java:113)
	at org.sikuli.script.Region.doCheckLastSeenAndCreateFinder(Region.java:3015)
	at org.sikuli.script.Region.checkLastSeenAndCreateFinder(Region.java:2971)
	at org.sikuli.script.Region.doFind(Region.java:2900)
	at org.sikuli.script.Region.access$500(Region.java:29)
	at org.sikuli.script.Region$RepeatableFind.run(Region.java:3144)
	at org.sikuli.script.Region$Repeatable.repeat(Region.java:3100)
	at org.sikuli.script.Region.wait(Region.java:2733)
	at org.sikuli.script.Region.find(Region.java:2336)
	at org.sikuli.script.Region.getLocationFromTarget(Region.java:3213)
	at org.sikuli.script.Region.click(Region.java:3698)
	at org.sikuli.script.Region.click(Region.java:3683)
	at Test.main(Test.java:12)

    My android version is 4.4.4, I heard about it works fine on android 6.x. My question is : is there any solution for android v4.x?

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.