Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

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

Discussion in 'Android' started by benni05, Jul 14, 2011.

  1. benni05

    benni05

    Joined:
    Mar 17, 2011
    Posts:
    58
    Hello,

    I see frequent user error reports on those 2 issues:

    Code (csharp):
    1. java.lang.UnsatisfiedLinkError: Couldn't load mono: findLibrary returned null
    2. at java.lang.Runtime.loadLibrary(Runtime.java:429)
    3. at java.lang.System.loadLibrary(System.java:554)
    4. at com.unity3d.player.UnityPlayer.d(Unknown Source)
    5. at com.unity3d.player.UnityPlayer.<init>(Unknown Source)
    6. at com.unity3d.player.UnityPlayerActivity.onCreate(Unknown Source)
    7. 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.

    Code (csharp):
    1. super.onCreate(savedInstanceState);

    Also:

    Code (csharp):
    1. java.lang.IllegalStateException: play() called on uninitialized AudioTrack.
    2. at android.media.AudioTrack.play(AudioTrack.java:824)
    3. 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
     
  2. rlee

    rlee

    Joined:
    Oct 4, 2011
    Posts:
    1
    Also getting the same problem ...

    Any help would be greatly appreciated.

    Thanks,
    Reuben
     
  3. oliverdb

    oliverdb

    Joined:
    Jan 30, 2010
    Posts:
    165
    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.<init>(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)
     
  4. happyhopper

    happyhopper

    Joined:
    Feb 16, 2011
    Posts:
    31
    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.<init>(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)
     
  5. skullthug

    skullthug

    Joined:
    Oct 16, 2011
    Posts:
    202
    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.<init>(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
     
  6. zpinner

    zpinner

    Joined:
    Jun 18, 2012
    Posts:
    21
    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.
     
    Last edited: Sep 25, 2012
  7. pvk

    pvk

    Joined:
    Jul 18, 2012
    Posts:
    11
    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.<init>(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)
     
  8. TheFatController

    TheFatController

    Joined:
    Sep 20, 2010
    Posts:
    4
    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.
     
  9. skullthug

    skullthug

    Joined:
    Oct 16, 2011
    Posts:
    202
    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.
     
  10. kakyounity

    kakyounity

    Joined:
    Apr 18, 2012
    Posts:
    4
    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.
     
  11. Ipsquiggle

    Ipsquiggle

    Joined:
    Nov 15, 2009
    Posts:
    8
    This worked for me.. had to actually uninstall from the device, fresh builds wasn't enough! How odd and lame. :p

    Thanks! :)