Failed to run on the device - Failed to load AOT module

BozenaKotBozenaKot ✭✭PLMember ✭✭
edited July 2014 in Xamarin.iOS

Hi

My app crashes on start with info:
Failed to load AOT module '/private/var/mobile/Applications/3B7FE167-6E01-401B-A0D9-60FB5596BF8F/MyAppp.app/System.Web.Services.dll.dylib' in aot-only mode.

I uninstalled the app from the device, as some suggested it might help, but problem still exists.

On the emulator it works OK.

System specs :
=== Xamarin Studio ===

Version 5.1.2 (build 0)
Installation UUID: cccdcd68-8019-43bb-8257-2f5c160881ab
Runtime:
Mono 3.4.0 ((no/954ed3c)
GTK+ 2.24.23 (Raleigh theme)

Package version: 304000214

=== Xamarin.Android ===

Not Installed

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.Mac ===

Version:

=== Xamarin.iOS ===

Version: 7.2.5.5 (Indie Edition)
Hash: 87026b6
Branch:
Build date: 2014-07-02 19:39:08-0400

=== Build Information ===

Release ID: 501020000
Git revision: 4574b1e5cf09f2e95e486c259bd9267a68c77cb3
Build date: 2014-07-02 20:50:40-04
Xamarin addins: fdea6fe3e36cda39291b39c81133e409c6d6f092

=== Operating System ===

Mac OS X 10.9.3
Darwin MacBook-Pro-Tomasz.local 13.2.0 Darwin Kernel Version 13.2.0
Thu Apr 17 23:03:13 PDT 2014
root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64

Regards
Koto

Posts

  • GEORGESAPPGEORGESAPP USMember

    Worked for me :+1:

  • MikaelBedemoMikaelBedemo USMember

    Worked for me as well.

  • Worked for me too, Thanks :+1:

  • TomKonijnTomKonijn USMember

    Tnx, worked for me as well :smile:

  • MatthewWaring.4722MatthewWaring.4722 ✭✭ GBUniversity ✭✭

    Laugh, and me today too, good old clean and retry! ....

  • SouravLahotiSouravLahoti USMember

    Worked for me too. thanks a lot

  • NielsCupNielsCup ✭✭✭ NLMember ✭✭✭
    edited July 2017

    Wow and the painful thing here was that my debug version went fine, So I build a relase and published it to one of my test channels and that one crashed upon startup. Next time testing the release build first is a good idea as well. Didn't know this was possible.

  • Xam_DeveloperXam_Developer ✭✭ INMember ✭✭

    Hi Niels,

    Same thing happened to me.. In DEBUG mode it works fine by loading PCL dll, but in Release mode, it fails to load in iPhone.

    I tried clean 'n' build. Did not work out.

    Can any one help me here ?

  • NielsCupNielsCup ✭✭✭ NLMember ✭✭✭
    edited August 2017

    You could try to manually remove the bin and object folders from all of your projects, if that still doesn't work I usually throw my computer out of the window...

  • NielsCupNielsCup ✭✭✭ NLMember ✭✭✭

    @Xam_Developer : Today I ran into the same issue again: After a month or so I tried to run the project again on iPhone Simulator. But I immediately got build errors stating incorrect references to other projects in my solution. I didn't touch any code since the last time I opened the project. On a closer look I saw that I was trying to run in Release mode instead of debug. Switching to debug the build errors went away.

    So that means that in Release mode my mappings are incorrect.

    To correct this:
    1. Right click solution
    2. click options
    3. go to Build > configurations
    4. Open configuration mappings tab
    5. Select the configuration you have problems with (in my case it was release)
    6. Select the platform you are having problems with (in my case iPhone Simulator)
    7. Now check the boxes for the projects under build that are necessary for this configuration.

    Maybe this solves your problem as well.

  • rodrigorogliorodrigoroglio ✭✭ USMember ✭✭

    Clean build WORKS for me, thanks!

Sign In or Register to comment.