android - "java.lang.UnsatisfiedLinkError: *.so: Can't find dependent libraries" in unit-test env -
i'm trying figure out how integrate native lib android code. create simple c++ function , it's work fine when running code on device. current goal make work in unit-test env (junit), , faced problems:
so, in unit-test env system.loadlibrary("lib")
not working, , cange system.load("/full/path/to/lib.so")
, line throw exception:
java.lang.unsatisfiedlinkerror: app\build\intermediates\cmake\debug\obj\x86_64\liblib.so: can't find dependent libraries @ java.lang.classloader$nativelibrary.load(native method) @ java.lang.classloader.loadlibrary0(classloader.java:1941) @ java.lang.classloader.loadlibrary(classloader.java:1824) @ java.lang.runtime.load0(runtime.java:809) @ java.lang.system.load(system.java:1086)
path correct , there file path exists.
i tryed use path x86
based version of lib, it's still throw same exception.
i'm using latest android ndk, clang toolchain, running unit-tests on windows 7 64 bit based laptop, cpu core i7, , java version in runtime seems 64 bit.
so problem in case , how fix it?
i have feeling having in mind fact clang compile x86/x86_64 *.so files, still invalid in windows based env, don't have linux installed check idea.
it can obviously, message tells *.so library depends on others libraries not presented on target platform (on android in case).
probably, library using thing windows api. suggest detect bad dependencies using tools dependency walker
Comments
Post a Comment