Skip to content
This repository has been archived by the owner on Mar 14, 2018. It is now read-only.

Test Android By SikuliX,and get the result "Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_Mat(III)J" #301

Open
ganmaotong opened this issue Jan 17, 2018 · 3 comments

Comments

@ganmaotong
Copy link

ganmaotong commented Jan 17, 2018

1、I want to test android app by sikuliX, and include sikulixapi.jar in the CLASSPATH of My Java project (sikulixapi-1.1.1)
2、My code like that:
`package com.stone.sikuli.test;

import org.junit.Test;
import org.opencv.core.Core;
import org.sikuli.android.ADBScreen;
import org.sikuli.basics.Debug;
import org.sikuli.script.FindFailed;
import org.sikuli.script.ImagePath;

public class AndroidTest {

public static void main(String[] args) throws FindFailed, InterruptedException {
	ADBScreen s = new ADBScreen();
	s.wakeUp(5);
       String imgpath = "D:\\image";
       ImagePath.add(imgpath);
       s.doubleClick("op.png");
    
}

}`

use Eclipse IDE,and run the application, return a Exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_Mat(III)J at org.opencv.core.Mat.n_Mat(Native Method) at org.opencv.core.Mat.<init>(Mat.java:477) at org.sikuli.android.ADBDevice.captureDeviceScreenMat(ADBDevice.java:204) at org.sikuli.android.ADBDevice.captureDeviceScreen(ADBDevice.java:151) at org.sikuli.android.ADBDevice.captureScreen(ADBDevice.java:138) at org.sikuli.android.ADBScreen.capture(ADBScreen.java:148) at org.sikuli.android.ADBScreen.capture(ADBScreen.java:158) at org.sikuli.script.Region.doCheckLastSeenAndCreateFinder(Region.java:2976) 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.doubleClick(Region.java:3745) at org.sikuli.script.Region.doubleClick(Region.java:3730) at com.stone.sikuli.test.AndroidTest.main(AndroidTest.java:20)

how to fix the bug? How can i use sikuliX for Android Test

@RaiMan
Copy link
Owner

RaiMan commented Jan 17, 2018

What system?

Please try latest 1.1.2 nightly.

@ganmaotong
Copy link
Author

ganmaotong commented Jan 17, 2018

@RaiMan
Android 5.0.2
Windows 10
Java 1.7
Do I need to import opncv-2.4X.jar to my project?Thanks a lot

@terces
Copy link

terces commented Jan 18, 2018

#210 (comment)
Try this suggestion, it works for me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants