Following on from a response that I got in this forum thread, I worked out that I needed to call
Java.Lang.JavaSystem.LoadLibrary("pocketsphinx_jni");
in the OnCreate method of my class, before calling the DefaultConfig method.
سؤال
I want to create a Java Bindings library for the PocketSphinx Android Demo project for Xamarin, that I can then use in my Android application. I have done the following:
No matter what I do I can't run the line of C# code
var config = Decoder.DefaultConfig();
I always get a Java.Lang.UnsatisfiedLinkError
exception (as described in my forum post here). I'm trying to run this line of code because the demo project has this line of java:
Config config = defaultConfig();
My question is, do I need to use DllImport
here? Or perhaps Java.Lang.JavaSystem.LoadLibrary
? Is this a scenario where the project should be built using ndk-build?
I have tried both DllImport and LoadLibrary with no success. Any leads or things to try much appreciated!
Thanks in advance,
David
المحلول
Following on from a response that I got in this forum thread, I worked out that I needed to call
Java.Lang.JavaSystem.LoadLibrary("pocketsphinx_jni");
in the OnCreate method of my class, before calling the DefaultConfig method.