FMOD library failing to load for Android 4.4

I can build my game successfully, and run it as expected on Android 8.0.

However FMOD fails to load on Android 4.4.4

I am using Unity 5.4.2f2, and FMOD Studio Unity integration 1.07.07. The device where it fails is a Motorola DROID ULTRA.

logs from the device at the seeming first point of error are: ############

D/dalvikvm( 9944): Trying to load lib /data/app-lib/com.EphemerationGames.RibbonDive-1/libfmod.so 0x42048890

D/dalvikvm( 9944): Added shared lib /data/app-lib/com.EphemerationGames.RibbonDive-1/libfmod.so 0x42048890

W/dalvikvm( 9944): Unable to resolve superclass of Lorg/fmod/MediaCodec; (50)

W/dalvikvm( 9944): Link of class ā€˜Lorg/fmod/MediaCodec;ā€™ failed

I/Unity ( 9944): AndroidJavaException: java.lang.NoClassDefFoundError: org/fmod/MediaCodec

I/Unity ( 9944): java.lang.NoClassDefFoundError: org/fmod/MediaCodec

I/Unity ( 9944): at java.lang.Runtime.nativeLoad(Native Method)

I/Unity ( 9944): at java.lang.Runtime.doLoad(Runtime.java:421)

I/Unity ( 9944): at java.lang.Runtime.loadLibrary(Runtime.java:362)

I/Unity ( 9944): at java.lang.System.loadLibrary(System.java:526)

I/Unity ( 9944): at com.unity3d.player.UnityPlayer.nativeRender(Native Method)

I/Unity ( 9944): at com.unity3d.player.UnityPlayer.a(Unknown Source)

I/Unity ( 9944): at com.unity3d.player.UnityPlayer$b$1.handleMessage(Unknown Source)

I/Unity ( 9944): at android.os.Handler.dispatchMessage(Handler.java:98)

I/Unity ( 9944): at android.os.Looper.loop(Looper.java:136)

I/Unity ( 9944): at com.unity3d.player.UnityPlayer$b.run(Unknown Source)

I/Unity ( 9944): Caused by: java.lang.ClassNotFoundException: Didnā€™t find class ā€œorg.fmod.MediaCodecā€ on path: DexPathList[[zip file ā€œ/data/app/com.EphemerationGames.RibbonDive-1.apkā€],nativeLibraryDirectories=[/data/app-lib/com.EphemerationGames.RibbonDive-1, /vendor/lib, /system/lib]]

I/Unity ( 9944): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)

I/Unity ( 9944): at java.lan

################ And then shortly thereafter #############

D/dalvikvm( 9944): Trying to load lib /data/app-lib/com.EphemerationGames.RibbonDive-1/libfmod.so 0x42048890

D/dalvikvm( 9944): Shared lib ā€˜/data/app-lib/com.EphemerationGames.RibbonDive-1/libfmod.soā€™ already loaded in same CL 0x42048890

I/Unity ( 9944): AndroidJavaException: java.lang.UnsatisfiedLinkError: unknown failure

I/Unity ( 9944): java.lang.UnsatisfiedLinkError: unknown failure

I/Unity ( 9944): at java.lang.Runtime.loadLibrary(Runtime.java:364)

I/Unity ( 9944): at java.lang.System.loadLibrary(System.java:526)

I/Unity ( 9944): at com.unity3d.player.UnityPlayer.nativeRender(Native Method)

I/Unity ( 9944): at com.unity3d.player.UnityPlayer.a(Unknown Source)

I/Unity ( 9944): at com.unity3d.player.UnityPlayer$b$1.handleMessage(Unknown Source)

I/Unity ( 9944): at android.os.Handler.dispatchMessage(Handler.java:98)

I/Unity ( 9944): at android.os.Looper.loop(Looper.java:136)

I/Unity ( 9944): at com.unity3d.player.UnityPlayer$b.run(Unknown Source)

I/Unity ( 9944): at UnityEngine.AndroidJNISafe.CheckException () [0x00085] in /Users/builduser/buildslave/unity/build/Runtime/Export/AndroidJNISafe.cs:25

I/Unity ( 9944): at UnityEngine.AndroidJNISafe.CallStaticVoidMethod (IntPtr clazz, IntPtr methodID, UnityEngine.jvalue[] args) [0x0000d] in /Users/builduser/buildslave/unity/build/Runtime/Export/AndroidJNISafe.cs:206

I/Unity ( 9944): at UnityEngine.AndroidJavaObject._CallStatic (System.String methodName, System.Object[] args) [0x00024] in /Users/bu

###########################

I did some looking through existing issues/questions and found this:

https://www.fmod.org/questions/question/android-does-not-load-libfmodstudio-so/

Which seems related but not quite the same issue seeing as it expects to be resolved by dynamic linking in Android 4.4. I tried the recommended solution anyways with no success.

I also tried the proposed solution for this potentially related issue, with no success:

http://www.fmod.org/questions/question/forum-40105/

This issue seems maybe related as well. Perhaps Iā€™m using functionality not implemented for all platforms?:

https://www.fmod.org/questions/question/fmod-studio-not-working-on-android-6-0-1/

I donā€™t think Iā€™m using any external assets outside of the bank as this issue:

http://www.fmod.org/questions/question/forum-40105/

I am using both unity audio and fmod audio. I saw in the general FMOD unity integration support page that they recommend turning off unity audio. I tried this and it did not resolve the issue with FMOD. None of the other recommendations seemed to apply to my situation.

http://www.fmod.org/documentation/#content/generated/engine_new_unity/troubleshooting.html

Please advise.

Thank you.

Iā€™m unable to use the tagging system for some reason. If somebody could edit this to include the tag Android, that would be very helpful.

Just in case you arenā€™t aware, 1.07 is not supported anymore and we would highly recommend updating to at least 1.08 to get the latest fixes and features.
That being said, this particular bug was fixed in 1.07.08, updating should solve this for you.

1 Like

ah, thanks! I should have included the potential to update in my original post, but hadnā€™t looked through all the release notes.

Much appreciated.