I have the following code in an Android project:
static {
System.loadLibrary("FLAC");
System.load("libLibFlacWrapper.so");
}
This code runs perfectly well on android 21, and a variety of other API levels i've manually tested. I've also tried loadLibrary for libLibFlacWrapper.so but that doesn't work either.
However when I try and run the project on an API 10 device I get:
Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lxappmedia/xvrclientandroid/FLACStreamEncoder;
E/AndroidRuntime(28810): at xappmedia.xvrclientandroid.XVRRecognizer.<init>(XVRRecognizer.java:118)
E/AndroidRuntime(28810): at xappmedia.sdk.service.XVRSpeechRecognizerImpl.<init>(XVRSpeechRecognizerImpl.java:24)
E/AndroidRuntime(28810): at xappmedia.sdk.core.Global.getSpeechRecognizer(Global.java:426)
E/AndroidRuntime(28810): at xappmedia.sdk.state.AdDirectorContext.initialize(AdDirectorContext.java:133)
E/AndroidRuntime(28810): at xappmedia.sdk.state.AdDirector.playAdvertisement(AdDirector.java:186)
E/AndroidRuntime(28810): at xappmedia.sdk.XappAds.playAd(XappAds.java:812)
E/AndroidRuntime(28810): at xappmedia.sdk.XappAds$19.run(XappAds.java:629)
E/AndroidRuntime(28810): at xappmedia.sdk.core.Global$1.run(Global.java:260)
E/AndroidRuntime(28810): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load libLibFlacWrapper.so: findLibrary returned null
E/AndroidRuntime(28810): at xappmedia.xvrclientandroid.FLACStreamEncoder.<clinit>(FLACStreamEncoder.java:33)
The FLAC library loads correctly, but no matter what naming I use for libLibFlacWrapper.so i can't get it to load properly on API 10.
I don't see anything documenting different behaviors between API levels on this topic.
JNI_Onload
call in library libLibFlacWrapper.so. Could you see the code and check to see if there is exception throw inJNI_Onload