Search code examples
androidxamarinmonoxamarin.android

Xamarin: Couldn't find "libmonodroid.so" emulator error


I've been getting this problem for a couple days and haven't found a solution yet.

I've been using an Android 7.0 ARM (armeabi-v7a) image for my emulator. Because it's so painfully slow, I've been trying to use Android 7.0 Intel Atom (x86_64) with HAXM but I get the following error when opening the app.

AndroidRuntime: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/SiteToolsMobile. Droid-1/base.apk"],nativeLibraryDirectories=[/data/app/SiteToolsMobile.Droid-1/l ib/x86_64, /data/app/SiteToolsMobile.Droid-1/base.apk!/lib/x86_64, /vendor/lib64 , /system/lib64]]] couldn't find "libmonodroid.so"

The full logcat can be seen here-

--------- beginning of system 10-26 10:30:39.317 1534 1545 I ActivityManager: START u0 {act=android.intent.a ction.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=SiteToolsMo bile.Droid/md5988fcde8450a201101ada904f480bb79.SplashActivity (has extras)} from uid 10007 on display 0 --------- beginning of main 10-26 10:30:39.360 2778 2778 I art : Not late-enabling -Xcheck:jni (alread y on) 10-26 10:30:39.368 1534 1715 I ActivityManager: Start proc 2778:SiteToolsMobil e.Droid/u0a56 for activity SiteToolsMobile.Droid/md5988fcde8450a201101ada904f480 bb79.SplashActivity 10-26 10:30:39.395 2778 2778 D AndroidRuntime: Shutting down VM --------- beginning of crash 10-26 10:30:39.395 2778 2778 E AndroidRuntime: FATAL EXCEPTION: main 10-26 10:30:39.395 2778 2778 E AndroidRuntime: Process: SiteToolsMobile.Droid, PID: 2778 10-26 10:30:39.395 2778 2778 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/SiteToolsMobile. Droid-1/base.apk"],nativeLibraryDirectories=[/data/app/SiteToolsMobile.Droid-1/l ib/x86_64, /data/app/SiteToolsMobile.Droid-1/base.apk!/lib/x86_64, /vendor/lib64 , /system/lib64]]] couldn't find "libmonodroid.so" 10-26 10:30:39.395 2778 2778 E AndroidRuntime: at java.lang.Runtime.loa dLibrary(Runtime.java:367) 10-26 10:30:39.395 2778 2778 E AndroidRuntime: at java.lang.System.load Library(System.java:1076) 10-26 10:30:39.395 2778 2778 E AndroidRuntime: at mono.MonoPackageManag er.LoadApplication(MonoPackageManager.java:34) 10-26 10:30:39.395 2778 2778 E AndroidRuntime: at mono.MonoRuntimeProvi der.attachInfo(MonoRuntimeProvider.java:42) 10-26 10:30:39.395 2778 2778 E AndroidRuntime: at android.app.ActivityT hread.installProvider(ActivityThread.java:5153) 10-26 10:30:39.395 2778 2778 E AndroidRuntime: at android.app.ActivityT hread.installContentProviders(ActivityThread.java:4748) 10-26 10:30:39.395 2778 2778 E AndroidRuntime: at android.app.ActivityT hread.handleBindApplication(ActivityThread.java:4688) 10-26 10:30:39.395 2778 2778 E AndroidRuntime: at android.app.ActivityT hread.-wrap1(ActivityThread.java) 10-26 10:30:39.395 2778 2778 E AndroidRuntime: at android.app.ActivityT hread$H.handleMessage(ActivityThread.java:1405) 10-26 10:30:39.395 2778 2778 E AndroidRuntime: at android.os.Handler.di spatchMessage(Handler.java:102) 10-26 10:30:39.395 2778 2778 E AndroidRuntime: at android.os.Looper.loo p(Looper.java:148) 10-26 10:30:39.395 2778 2778 E AndroidRuntime: at android.app.ActivityT hread.main(ActivityThread.java:5417) 10-26 10:30:39.395 2778 2778 E AndroidRuntime: at java.lang.reflect.Met hod.invoke(Native Method) 10-26 10:30:39.395 2778 2778 E AndroidRuntime: at com.android.internal. os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 10-26 10:30:39.395 2778 2778 E AndroidRuntime: at com.android.internal. os.ZygoteInit.main(ZygoteInit.java:616) 10-26 10:30:39.396 1534 2013 W ActivityManager: Force finishing activity Sit eToolsMobile.Droid/md5988fcde8450a201101ada904f480bb79.SplashActivity 10-26 10:30:39.699 1534 2013 I WindowManager: Screenshot max retries 4 of Toke n{e7ebe9 ActivityRecord{6e79c70 u0 SiteToolsMobile.Droid/md5988fcde8450a201101ad a904f480bb79.SplashActivity t6 f}} appWin=Window{a134507 u0 Starting SiteToolsMo bile.Droid} drawState=1 10-26 10:30:39.736 1534 2729 I OpenGLRenderer: Initialized EGL, version 1.4 10-26 10:30:40.201 1534 1548 W ActivityManager: Activity pause timeout for Act ivityRecord{6e79c70 u0 SiteToolsMobile.Droid/md5988fcde8450a201101ada904f480bb79 .SplashActivity t6 f} 10-26 10:30:43.005 2778 2778 I Process : Sending signal. PID: 2778 SIG: 9 10-26 10:30:43.016 1534 2729 E Surface : getSlotFromBufferLocked: unknown buff er: 0x7fb4b733ab20 10-26 10:30:43.027 1534 2013 W InputMethodManagerService: Window already focus ed, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Pr oxy@67e1464 attribute=null, token = android.os.BinderProxy@f656261 10-26 10:30:43.053 1534 1716 I ActivityManager: Process SiteToolsMobile.Droid (pid 2778) has died 10-26 10:30:43.207 1534 1553 W AppOps : Finishing op nesting under-run: uid 1 000 pkg android code 24 time=0 duration=0 nesting=0

So i know it can't find this lib, but I don't know why it can't find this lib and I don't know how to fix it.

I've tried uninstalling the app, cleaning the solution, and rebuilding. I've tried the 6.0 as well as 7.1.1 system images.

I haven't tried reinstalling xamarin or anything else because that would take the rest of the day on the network I have available to me.

Why doesn't libmonodroid.so exist and how do I fix it?

EDIT

x86_64 is enabled. Here is a screenshot of my device and the advanced android options.

AVD Settings-

enter image description here

Build Options-

enter image description here enter image description here enter image description here


Solution

  • I found a solution!

    Disable ever ABI except x86_64.

    I don't know yet which ABI causes the conflict. I think maybe X86. Because he always deployed a MonoRuntime...