Couldn't load mono: findLibrary returned null java.lang.IllegalStateException: pl

Hello,

I see frequent user error reports on those 2 issues:

java.lang.UnsatisfiedLinkError: Couldn't load mono: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:429)
at java.lang.System.loadLibrary(System.java:554)
at com.unity3d.player.UnityPlayer.d(Unknown Source)
at com.unity3d.player.UnityPlayer.<init>(Unknown Source)
at com.unity3d.player.UnityPlayerActivity.onCreate(Unknown Source)
at com.xyz.xyzproduct.xyzproducthere.onCreate(Xyzproducthere.java:80)

Line 80 in onCreate refers to the super call and is the first line in my onCreate method of the Java plugin Activity.

super.onCreate(savedInstanceState);

Also:

java.lang.IllegalStateException: play() called on uninitialized AudioTrack.
at android.media.AudioTrack.play(AudioTrack.java:824)
at org.fmod.FMODAudioDevice.run(Unknown Source)

Is there anything I could do about it or do I have to wait for an update of Unity to fix this?

Thanks
Ben

Also getting the same problem …

Any help would be greatly appreciated.

Thanks,
Reuben

M3…

java.lang.UnsatisfiedLinkError: Couldn’t load mono: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:429)
at java.lang.System.loadLibrary(System.java:554)
at com.unity3d.player.UnityPlayer.(Unknown Source)
at com.unity3d.player.UnityPlayerActivity.onCreate(Unknown Source)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1785)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1842)
at android.app.ActivityThread.access$1500(ActivityThread.java:132)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4268)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)

I am also receiving many reports with this error.

java.lang.UnsatisfiedLinkError: Couldn’t load mono: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:429)
at java.lang.System.loadLibrary(System.java:554)
at com.unity3d.player.UnityPlayer.(Unknown Source)
at com.unity3d.player.UnityPlayerActivity.onCreate(Unknown Source)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
at dalvik.system.NativeStart.main(Native Method)

Same here

E/AndroidRuntime( 2300): FATAL EXCEPTION: main

E/AndroidRuntime( 2300): java.lang.UnsatisfiedLinkError: Couldn’t load mono: findLibrary returned null

E/AndroidRuntime( 2300): at java.lang.Runtime.loadLibrary(Runtime.java:365)

E/AndroidRuntime( 2300): at java.lang.System.loadLibrary(System.java:535)

E/AndroidRuntime( 2300): at com.unity3d.player.UnityPlayer.(Unknown Source)

E/AndroidRuntime( 2300): at com.unity3d.player.UnityPlayerNativeActivity.onCreate(Unknown Source)

E/AndroidRuntime( 2300): at android.app.Activity.performCreate(Activity.java:5008)

E/AndroidRuntime( 2300): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)

E/AndroidRuntime( 2300): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2139)

E/AndroidRuntime( 2300): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2210)

E/AndroidRuntime( 2300): at android.app.ActivityThread.access$600(ActivityThread.java:142)

E/AndroidRuntime( 2300): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1208)

E/AndroidRuntime( 2300): at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime( 2300): at android.os.Looper.loop(Looper.java:137)

E/AndroidRuntime( 2300): at android.app.ActivityThread.main(ActivityThread.java:4929)

E/AndroidRuntime( 2300): at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime( 2300): at java.lang.reflect.Method.invoke(Method.java:511)

E/AndroidRuntime( 2300): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)

E/AndroidRuntime( 2300): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)

E/AndroidRuntime( 2300): at dalvik.system.NativeStart.main(Native Method)

W/ActivityManager( 300): Force finishing activity

same here.
I’m trying first time to run an android game build with unity. I tried a really simple scene, a plane and a cube, using just mobile standard assets.
Another variable that I should add is that I’m also running it in an emulator.

me too…

E/AndroidRuntime( 1797): FATAL EXCEPTION: main
E/AndroidRuntime( 1797): java.lang.UnsatisfiedLinkError: Couldn’t load mono: findLibrary returned null
E/AndroidRuntime( 1797): at java.lang.Runtime.loadLibrary(Runtime.java:365)
E/AndroidRuntime( 1797): at java.lang.System.loadLibrary(System.java:535)
E/AndroidRuntime( 1797): at com.unity3d.player.UnityPlayer.(Unknown Source)
E/AndroidRuntime( 1797): at com.unity3d.player.UnityPlayerActivity.onCreate(Unknown Source)
E/AndroidRuntime( 1797): at android.app.Activity.performCreate(Activity.java:5008)
E/AndroidRuntime( 1797): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
E/AndroidRuntime( 1797): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
E/AndroidRuntime( 1797): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
E/AndroidRuntime( 1797): at android.app.ActivityThread.access$600(ActivityThread.java:130)
E/AndroidRuntime( 1797): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
E/AndroidRuntime( 1797): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1797): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1797): at android.app.ActivityThread.main(ActivityThread.java:4745)
E/AndroidRuntime( 1797): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1797): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 1797): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
E/AndroidRuntime( 1797): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime( 1797): at dalvik.system.NativeStart.main(Native Method)

Just posting a possible cause of this error that we found:

For us it was running an ARMv7 build on an ARMv6 device. This is tricky to do as running from Unity (3.5.6) will detect the mismatch and not install the ARMv7 build on an ARMv6 device. However, our game was with QA and they managed it and it did indeed crash out with

“11-21 09:40:23.990 E/AndroidRuntime( 1509): java.lang.UnsatisfiedLinkError: Couldn’t load mono: findLibrary returned null”

in the log.

Just for the record if anyone else finds this thread, my problem turned out that the compiled app had become corrupted somehow. So everytime I would try to launch it or rebuild and launch it, it would crash regardless. The only fix I found for this was to delete the app from the device and then rebuild run after that. I’ve had it happen several times afterwards as well, so unfortunately this wasn’t just a freak occurrence.

I had the same issue when I put the Android plugin project (ndk) in the Assets/Plugins/Android folder and trusted Unity to deploy the plugin from there. I did this by following the Android plugin example. Seems Unity was having trouble finding the right .so.

After I moved the project out and copied only the correct .so (single arch) to Assets/Plugins/Android, the crash disappeared.

This worked for me… had to actually uninstall from the device, fresh builds wasn’t enough! How odd and lame. :stuck_out_tongue:

Thanks! :slight_smile: