android - Robolectric 2 with JNI -


in app stared using external library uses jni.

system.loadlibrary("somelib") 

also have unitests robolectric 2. when i'm running these tests i'm getting following exception:

java.lang.unsatisfiedlinkerror: no dafprovider in java.library.path 

how configure robolectric load native library?
note: i'm using maven

unfortunately, robolectric doesn't work jni. suggestion wrap jni library loading class , mock under test, or override jni method loading in test:

public class myapp extends application {    public void oncreate() {       loadjni();    }     protected void loadjni() {       system.loadlibrary("somelib");    } } 

in tests:

public class testmyapp extends myapp {     @override     protected void loadjni() {       //don't     } } 

Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -