New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support native libraries in tests #1516

Closed
xgouchet opened this Issue Jan 26, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@xgouchet
Copy link

xgouchet commented Jan 26, 2015

I'm using Robolectric to perform test on an Android Application, and a couple of classes use NDK for a few methods.

When I try to write tests for those methods, I get an UnsatisfiedLinkError :

java.lang.UnsatisfiedLinkError: no "foo" in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
    at java.lang.Runtime.loadLibrary0(Runtime.java:849)
    at java.lang.System.loadLibrary(System.java:1088)
    at com.foo.MyClass.<clinit>(MyClass.java:45)

How can I tell Robolectric where to find the natif libfoo.so library ?

I'm working with Android Studio 1.0.2, robolectric:2.3 on a Debian 64 computer

@erd

This comment has been minimized.

Copy link
Member

erd commented Jan 28, 2015

How can I tell Robolectric where to find the natif libfoo.so library ?

We don't currently support loading native libs in a test.

@erd erd changed the title UnsatisfiedLinkError when testing classes with native methods Support native libraries in tests Mar 20, 2015

@erd

This comment has been minimized.

Copy link
Member

erd commented Apr 24, 2015

Consolidating this into #1171.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment