Reputation: 75
Yesterday I decided to export my game (on which I'm currently working) to Android. I'm using Monogame for development and also integrated FMOD API (both Core and Studio) using C# wrapper which comes with downloaded FMOD Engine from their website.
On DesktopGL project everything works fine. But on Android unfortunatly I cought some issues. There is no audio and I looked at Device Log window and saw that that there is an error called ERR_INTERNAL (which means I should use logging version of FMOD, in other words no libfmod.so but libfmodL.so). So I used the logging version of FMOD and under the ERR_INTERNAL I saw this:
[ERR] FMOD_JNI_GetEnv : JNI_OnLoad has not run, should have occurred during System.LoadLibrary.
I've already asked the question on Monogame subreddit but there was no response. I guess here will be more people who have some experience with integrating FMOD to Android and can help me. I'd be pretty grateful!
Also there is how I setted up android integration of FMOD, maybe there is something wrong?
Build Action for all .so files is setted to AndroidNativeLibrary and AndroidLibrary setting for fmod.jar file in Android Binding project.
Upvotes: 0
Views: 44
Reputation: 75
Playing around with ChatGPT, I fixed the problem!
The problem was - I actually didn't load libraries. For people who also cought this problem there is solution:
In OnCreate method in Activity1.cs (or whatever it called in your case) before initializing the Game you need to write this
JavaSystem.LoadLibrary("fmodL");
JavaSystem.LoadLibrary("fmod");
JavaSystem.LoadLibrary("fmodstudioL");
JavaSystem.LoadLibrary("fmodstudio");
Upvotes: 0