AOT module 'mscorlib.dll.so' not found: dlopen failed

I'm having this problem when trying to debug using Visual Studio 2015,
When i create the apk and run in the BlueStacks the app works, yet when i try to run any emulator, both in release and debug mode, using the Visual Studio i get that error.
I tried it: http://theothergavin.net/xamarin-app-development-aot-module-mscorlib-dll-so-not-found/
uninstalling and installing the app. using the adb kill-server and restart.

And nothing work.
Also when i installed the latest xamarin it didn't install the visual studio emulator for android. I had to install it manually.

Anyone has any suggestions?

Bellow the output of the Debugger

Android application is debugging.

Could not connect to the debugger.
09-26 15:54:56.648 D/dalvikvm( 1568): Late-enabling CheckJNI
09-26 15:54:56.688 D/dalvikvm( 1568): Trying to load lib /data/app-lib/Xamarintest.Xamarintest-2/libmonodroid.so 0xa8f80868
09-26 15:54:56.688 D/dalvikvm( 1568): Added shared lib /data/app-lib/Xamarintest.Xamarintest-2/libmonodroid.so 0xa8f80868
09-26 15:54:56.692 W/monodroid( 1568): Using override path: /data/data/Xamarintest.Xamarintest/files/.override
09-26 15:54:56.692 W/monodroid( 1568): Trying to load sgen from: /data/data/Xamarintest.Xamarintest/files/.override/libmonosgen-2.0.so
09-26 15:54:56.692 W/monodroid( 1568): Trying to load sgen from: /storage/emulated/0/Android/data/Xamarintest.Xamarintest/files/.override/libmonosgen-2.0.so
09-26 15:54:56.692 W/monodroid( 1568): Trying to load sgen from: /data/app-lib/Xamarintest.Xamarintest-2/libmonosgen-2.0.so
09-26 15:54:56.712 W/monodroid( 1568): Trying to load sgen from: /data/data/Xamarintest.Xamarintest/files/.override/links/libmonosgen-2.0.so
09-26 15:54:56.720 W/monodroid-debug( 1568): Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8841,server=y,embedding=1
09-26 15:54:56.840 W/monodroid-debug( 1568): Accepted stdout connection: 43
09-26 15:54:57.648 D/Mono ( 1568): Image addref mscorlib[0xb7fc4470] -> mscorlib.dll[0xb7fd19b0]: 1
09-26 15:54:57.648 D/Mono ( 1568): AOT module 'mscorlib.dll.so' not found: dlopen failed: library "/data/app-lib/Xamarintest.Xamarintest-2/libaot-mscorlib.dll.so" not found
09-26 15:54:57.648 D/Mono ( 1568): AOT module '/Users/builder/data/lanes/3511/f4db8a57/source/monodroid/builds/install/mono-x86/lib/mono/aot-cache/x86/mscorlib.dll.so' not found: dlopen failed: library "/data/app-lib/Xamarintest.Xamarintest-2/libaot-mscorlib.dll.so" not found
09-26 15:54:57.684 D/Mono ( 1568): Config attempting to parse: 'mscorlib.dll.config'.
09-26 15:54:57.684 D/Mono ( 1568): Config attempting to parse: '/Users/builder/data/lanes/3511/f4db8a57/source/monodroid/builds/install/mono-x86/etc/mono/assemblies/mscorlib/mscorlib.config'.

Best Answers

Answers

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    not found: dlopen failed: library "/data/app-lib/Xamarintest.Xamarintest-2/libaot-mscorlib.dll.so" not found

    This message is unfortunately a misleadingly ignorable message (see Bug 42933), so the cause of the problem you're seeing will be something else.

    For the Visual Studio Emulator, one common issue withy starting the debugger is related to Skylake processors. See "Cannot attach debugger to a Xamarin project" on https://msdn.microsoft.com/en-us/library/mt228282.aspx.

  • DIvinorium1DIvinorium1 BRMember ✭✭

    I have a Phenom II X6 so it's not a skylake processor. And for what i saw, the method they used to try to fix it is the same in the link i posted, Enabling "Migrate to a physical computer with a different processor version"

  • dawosdawos UAMember ✭✭

    I also have this problem on AMD CPU. All my apps crashes in Visual Studio Android Emulator and on Genymotion too. This problem appears after updating Xamarin to Cycle 8. Xamarin, any ideas how to fix this?..

  • DIvinorium1DIvinorium1 BRMember ✭✭

    So.... no other suggestions?

  • dawosdawos UAMember ✭✭
    edited September 2016

    Two solutions from online documentation not works at all. 1) I try to disable fast deployment in Xamarin project properties and 2) Enable migration to physical cpu in emulator options (in VS Emulator). Rolling back xamarin to cycle 7 solved this problem. Xamarin team, please check this issue. Funny, because it's second stable release in cycle 8, but problem still not solved.

    Best regards, Dawos.

  • DIvinorium1DIvinorium1 BRMember ✭✭

    Actually i installed the Cycle 7 and it worked, so dawos answer was right. I'm not sure if i should keep this question open, since the problem with the cycle 8 isn't solved or mark it as answered.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    If you might by chance be able to submit a test case that demonstrates the problem on Cycle 8, then please do file a quick bug report (optionally marked private) with as many details as possible:

    https://developer.xamarin.com/guides/cross-platform/troubleshooting/questions/howto-file-bug/

    Thanks!

  • LucaPinascoLucaPinasco ITMember ✭✭

    there is a bug related to this problem:
    https://bugzilla.xamarin.com/show_bug.cgi?id=45212

  • BrunoGreenBrunoGreen BRMember

    I have the same issue, is there a fix available (other than downgrading)?

  • rohanskrohansk USMember

    I am facing this same issue only on marshmallow emulator (6.0.0) XHDPI Phone (Android 6.0 API level 23). My app is working fine on lower API emulators from levels 19 to 22.

  • SoerntPoppeSoerntPoppe DEUniversity ✭✭

    I have the same problem.
    The option "Use Fast Deployment (debug mode only)" is unchecked.
    I opened the Hyper-V Manager, select the Virtual Image for the Emulator, but I can't find a option "Migrate to a physical computer with a different processor version".

    I use Windows 10 Professional, VS 2015 Community Edit, Update 3.

  • DanielMachadoDanielMachado BRMember
    edited March 2017

    I have the same issue. I have a phenom x3 processor.

  • LomedilLomedil USMember

    Same here with a Phenom X4 processor. I saw it first time in cycle 8, but cycle 9 has the same issue too.
    Now, I cannot find any link to download the cycle 7. Do you know where I can get it?

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    I cannot find any link to download the cycle 7. Do you know where I can get it?

    Feel free to send an email to [email protected] to request older versions that no longer appear on the downloads page.

    (See also "Note about old versions" on the downgrading article.)

  • PalemanPaleman USMember

    I also had the same error as some of you.. the cycle8.. problem not yet. my problem with not possible to run on virtual was solved by checking the Migrate to a physical computer with a different processor version can be found here

  • AnndySiotoAnndySioto ESMember

    Me ha solucionado el problema después de una semana buscando solución, al final solucionado!

  • I am also facing the same issue:

    Things I tried:

    1) Tried to disable fast deployment in Xamarin project properties.
    2) Enable migration to physical CPU in emulator options (in Hyper-V settings).
    3) Completely reinstall visual studio 2017 .
    4) Completely formatted the system and reinstalled everything from the scratch.

    Version used : Visual studio 2017 enterprise edition
    Using AMD processor.

    Please help I am stuck with this for 5 days now.

Sign In or Register to comment.