Closed sboishtyan closed 6 years ago
Hello @sboishtyan . You can't use native libraries in unit tests. You have to use instrumentation tests instead, as the libraries require access to the emulator (or device).
See: https://developer.android.com/training/testing/unit-testing/instrumented-unit-tests
@ericwlange Hello, thank you, but i knew about this aproach. My case is run on my desktop.
@sboishtyan Not sure I understand the issue. Are you trying to run this outside of Android?
@ericwlange Yes, i'm trying to run this on my local machine.
I don't think it will work. LiquidCore depends on the Android runtime environment. It is not generic Java.
Hello everyone, i try to write unit test, that use JSContext and when the static initializer executes,
static { System.loadLibrary("node"); System.loadLibrary("liquidcore"); }
then i see following stacktrace:java.lang.UnsatisfiedLinkError: no node in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at org.liquidplayer.javascript.JSContext.<clinit>(JSContext.java:52)
what is the correct way to tell java where is my libs? I find some solution to modify java.library.path property, but i don't now is this an effective way.