Library error in android


#1

Hi,
i have configured libmuse to android project. [i am using eclipse]
i am getting an error when i hit on ‘Connect’ button.
what should i do to solve it?

04-20 16:35:52.673: E/AndroidRuntime(1480): FATAL EXCEPTION: main
04-20 16:35:52.673: E/AndroidRuntime(1480): Process: com.testpro.testpro, PID: 1480
04-20 16:35:52.673: E/AndroidRuntime(1480): java.lang.UnsatisfiedLinkError: Couldn’t load muse_android from loader

dalvik.system.PathClassLoader[DexPathList[[zip file “/data/app/com.testpro.testpro-2.apk”],nativeLibraryDirectories=

[/data/app-lib/com.testpro.testpro-2, /system/lib]]]: findLibrary returned null
04-20 16:35:52.673: E/AndroidRuntime(1480): at java.lang.Runtime.loadLibrary(Runtime.java:358)
04-20 16:35:52.673: E/AndroidRuntime(1480): at java.lang.System.loadLibrary(System.java:526)
04-20 16:35:52.673: E/AndroidRuntime(1480): at com.interaxon.libmuse.MuseManager.<clinit>(MuseMan ager.java:34)
04-20 16:35:52.673: E/AndroidRuntime(1480): at com.testpro.testpro.Thinkit.onClick(Thinkit.java:2 15)
04-20 16:35:52.673: E/AndroidRuntime(1480): at android.view.View.performClick(View.java:4438)
04-20 16:35:52.673: E/AndroidRuntime(1480): at android.view.View$PerformClick.run(View.java:18422 )
04-20 16:35:52.673: E/AndroidRuntime(1480): at android.os.Handler.handleCallback(Handler.java:733 )
04-20 16:35:52.673: E/AndroidRuntime(1480): at android.os.Handler.dispatchMessage(Handler.java:95 )
04-20 16:35:52.673: E/AndroidRuntime(1480): at android.os.Looper.loop(Looper.java:136)
04-20 16:35:52.673: E/AndroidRuntime(1480): at android.app.ActivityThread.main(ActivityThread.jav a:5017)
04-20 16:35:52.673: E/AndroidRuntime(1480): at java.lang.reflect.Method.invokeNative(Native Method)
04-20 16:35:52.673: E/AndroidRuntime(1480): at java.lang.reflect.Method.invoke(Method.java:515)
04-20 16:35:52.673: E/AndroidRuntime(1480): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run

(ZygoteInit.java:779)
04-20 16:35:52.673: E/AndroidRuntime(1480): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:595)
04-20 16:35:52.673: E/AndroidRuntime(1480): at dalvik.system.NativeStart.main(Native Method)

Please help me.

Thanks


#2

Hi Vishal,

It looks, like you added jar file (libmuseandroid.jar) to your project, but you [B]didn’t add native library[/B] (libmuse_android.so). Native library contains most of the logic and its presence is critical. That’s why you get java.lang.UnsatisfiedLinkError, when you try to connect. You should have have files …/YourProject/libs/armeabi/libmuse_android.so and /YourProject/libs/x86/libmuse_android.so (x86 version is needed if you want to use emulator) in your project.
Check out our example application: libmuseInstallPath/libmuse_1.0.4/examples/TestLibMuseAndroid for details.


#3

Yes you are correct.
i forgot it.
Thanks very much Victor. You save my day.
Thanks again.