user834372
user834372

Reputation: 21

Android Mono '/data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so' not found

I wonder if you can help me with this error.

I am running a fresh fully updated install of windows 7 with Visual studio 2010 Professional in trial mode.

In Visual Studio I create a new OpenGl Mono for Android Application using the built in template. I compile and run the application.

The emulator boots (I am running API_8) EMU. The application starts and then aborts. (In the emulator I get a black screen which quickly closes.)

Same thing happens if I do similar using the Mono Develop IDE and or the other templates.

Here is a dump of the error message (I cannot find much info on google) It looks like the error is related to the load library fail.

Thanks

// DUMP

03-05 23:23:47.464 D/AndroidRuntime(  418): 
03-05 23:23:47.464 D/AndroidRuntime(  418): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
03-05 23:23:47.464 D/AndroidRuntime(  418): CheckJNI is ON
03-05 23:23:47.574 D/AndroidRuntime(  418): --- registering native functions ---
03-05 23:23:48.034 I/ActivityManager(   60): Start proc OpenGLApplication1.OpenGLApplication1 for broadcast OpenGLApplication1.OpenGLApplication1/mono.android.Seppuku: pid=424 uid=10038 gids={3003, 1015}
03-05 23:23:48.164 I/ActivityThread(  424): Publishing provider OpenGLApplication1.OpenGLApplication1.__mono_init__: mono.MonoRuntimeProvider
03-05 23:23:48.174 D/dalvikvm(  424): Trying to load lib /data/data/OpenGLApplication1.OpenGLApplication1/lib/libmonodroid.so 0x44e7f010
03-05 23:23:48.174 D/dalvikvm(  424): Added shared lib /data/data/OpenGLApplication1.OpenGLApplication1/lib/libmonodroid.so 0x44e7f010
03-05 23:23:48.184 F/MonoDroid(  424): shared runtime initialization error: Cannot load library: load_library[1083]: Library '/data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so' not found
03-05 23:23:48.204 I/ActivityManager(   60): Process OpenGLApplication1.OpenGLApplication1 (pid 424) has died.
03-05 23:23:48.214 D/AndroidRuntime(  418): Shutting down VM
03-05 23:23:48.214 D/jdwp    (  418): adbd disconnected
03-05 23:23:48.624 D/AndroidRuntime(  432): 
03-05 23:23:48.624 D/AndroidRuntime(  432): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
03-05 23:23:48.624 D/AndroidRuntime(  432): CheckJNI is ON
03-05 23:23:48.734 D/AndroidRuntime(  432): --- registering native functions ---
03-05 23:23:49.173 I/ActivityManager(   60): Start proc OpenGLApplication1.OpenGLApplication1 for broadcast OpenGLApplication1.OpenGLApplication1/mono.android.Seppuku: pid=438 uid=10038 gids={3003, 1015}
03-05 23:23:49.294 I/ActivityThread(  438): Publishing provider OpenGLApplication1.OpenGLApplication1.__mono_init__: mono.MonoRuntimeProvider
03-05 23:23:49.303 D/dalvikvm(  438): Trying to load lib /data/data/OpenGLApplication1.OpenGLApplication1/lib/libmonodroid.so 0x44e7f010
03-05 23:23:49.303 D/dalvikvm(  438): Added shared lib /data/data/OpenGLApplication1.OpenGLApplication1/lib/libmonodroid.so 0x44e7f010
03-05 23:23:49.314 F/MonoDroid(  438): shared runtime initialization error: Cannot load library: load_library[1083]: Library '/data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so' not found
03-05 23:23:49.334 I/ActivityManager(   60): Process OpenGLApplication1.OpenGLApplication1 (pid 438) has died.
03-05 23:23:49.344 D/AndroidRuntime(  432): Shutting down VM
03-05 23:23:49.344 D/jdwp    (  432): adbd disconnected
03-05 23:23:50.333 D/AndroidRuntime(  447): 
03-05 23:23:50.333 D/AndroidRuntime(  447): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
03-05 23:23:50.333 D/AndroidRuntime(  447): CheckJNI is ON
03-05 23:23:50.443 D/AndroidRuntime(  447): --- registering native functions ---
03-05 23:23:50.873 I/ActivityManager(   60): Starting activity: Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=OpenGLApplication1.OpenGLApplication1/openglapplication1.Activity1 }
03-05 23:23:50.893 I/ActivityManager(   60): Start proc OpenGLApplication1.OpenGLApplication1 for activity OpenGLApplication1.OpenGLApplication1/openglapplication1.Activity1: pid=453 uid=10038 gids={3003, 1015}
03-05 23:23:50.923 D/AndroidRuntime(  447): Shutting down VM
03-05 23:23:50.923 D/jdwp    (  447): adbd disconnected
03-05 23:23:50.953 I/AndroidRuntime(  447): NOTE: attach of thread 'Binder Thread #3' failed
03-05 23:23:51.173 I/ActivityThread(  453): Publishing provider OpenGLApplication1.OpenGLApplication1.__mono_init__: mono.MonoRuntimeProvider
03-05 23:23:51.223 D/dalvikvm(  453): Trying to load lib /data/data/OpenGLApplication1.OpenGLApplication1/lib/libmonodroid.so 0x44e7eef0
03-05 23:23:51.223 D/dalvikvm(  453): Added shared lib /data/data/OpenGLApplication1.OpenGLApplication1/lib/libmonodroid.so 0x44e7eef0
03-05 23:23:51.263 F/MonoDroid(  453): shared runtime initialization error: Cannot load library: load_library[1083]: Library '/data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so' not found
03-05 23:23:51.283 I/ActivityManager(   60): Process OpenGLApplication1.OpenGLApplication1 (pid 453) has died.
03-05 23:23:51.293 I/UsageStats(   60): Unexpected resume of com.android.launcher while already resumed in OpenGLApplication1.OpenGLApplication1
03-05 23:23:51.423 W/InputManagerService(   60): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@45104b68

Upvotes: 1

Views: 1379

Answers (3)

rsek
rsek

Reputation: 13

The issue is from the newer versions of mono where libmonosgen-2.0 does not get installed automatically. The path that you will see in which it fails is actually a simlink for the library. What you have to do is manually or through a non-mono apk, create the following:

A folder with your package name in /data/app-lib/ in the folder you will have to push the libmonosgen-2.0.so (and libmonodroid.so if needed)

After this is done you have to navigate to data/data/your.package.name and create a simlink from lib -> the folder you created previously. the command to use is ln -s.

I have noticed that in some cases the simlink exists, but is pointing to a false location.

I had to do this manually and it would not survive a factory reset. A colleugue of mine actually did this the non-mono apk path which does everything for him when ever the provisioning app executes on first launch.

Upvotes: 1

jonp
jonp

Reputation: 13600

Another possibility is that you don't have enough free space on your device. The problem isn't in your package (OpenGLApplication1), the problem is from installing the Mono.Android.DebugRuntime package, as /data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so doesn't exist.

I would suggest looking through the adb logcat log, and see if something like the following is present:

W/NativeHelper(   98): Failed to cache package shared libs
W/NativeHelper(   98): java.io.IOException: Couldn't create cached binary /data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so in /data/data/Mono.Android.DebugRuntime/lib
W/NativeHelper(   98):  at com.android.internal.content.NativeLibraryHelper.copyNativeBinaryLI(NativeLibraryHelper.java:289)

If messages like the above are present, remove the Mono.Android.DebugRuntime package (adb uninstall Mono.Android.DebugRuntime), remove some extra apps from your device (to free up space), and try re-installing your app from the IDE.

Upvotes: 0

jpobst
jpobst

Reputation: 9982

Try going to the project properties and turn off "fast deployment". Then manually remove your app from the emu/device, and try again.

Upvotes: 0

Related Questions