argh - you are correct. I just checked the LogCat output and I now see that the library is in-fact being loaded, but the method call itself is failing to resolve. Upon further inspection, it turns out I renamed my method but forgot to rename it in the native implementation file. Fixed that and now it's working. Thanks for your help.
-Mike On Oct 28, 10:57 am, Studio LFP <[email protected]> wrote: > The static initializer of your Java wrapper should be loading the library. > Do you have a System.loadLibrary() call in there? If you do, make sure you > have copied the .so file into the proper location in the libs directory of > your project. > > Steven > Studio LFPhttp://www.studio-lfp.com > > > > > > > > On Friday, October 28, 2011 12:46:58 PM UTC-5, mellery451 wrote: > > > I'm building an app and I have a corresponding test application for > > it. One of the first items I have added is some native code for a well- > > encapsulated computation (hashing). I now want to test this native > > code from my test application. I've imported the JNI wrapper class > > into my InstrumentationTestCase based test class - and with that, I'm > > able to compile the application. However, at runtime (running the > > tests) I get an UnsatisfiedLinkError thrown when the test tries to > > invoke the native method. > > > Does anyone know to call native code from a test app? Do I need to > > somehow force the native library to be part of the test application so > > that it can be loaded? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

