Android Emulator crash on certain solution

mathis01250mathis01250 ✭✭FRMember ✭✭
edited October 2018 in Xamarin.Forms

Hello,

2 years ago I made a simple Xamarin forms app.
Recently, I decided to take a new look at this app using visual studio 2017 on MacOs
I had some problems with packages that were out of date, but I managed to update them.
Now I can launch the app on the android emulator but unfortunately, after the app is launched I can use it for maybe 20 seconds and then the emulator crashes and Osx tells me that "qemu-system-i386" crashed.

Also, maybe it is not related but I have some generation warnings saying that there are conflicts between different version of the same assembly (My visual studio is in french so I hope that it still makes sense)
If I do what visual tells me to do, which is double click and then press "enter", VS ask to modify some file but then It fails to do so because the file is read only and the permission was denied (No password prompt)

Now of course, I thought that my installation of visual studio or Android studio was incorrect, so I tried to test the sample Xamarin Forms app. The emulator does not appear to crash even after several minutes.

I don't know if its needed but I've uploaded my csprof files for the "portable project" and the android one
I'm a student and I'm learning Xamarin/visual studio so I'm probably doing something stupid (or not doing something that everyone does)

I should add that the app used to work, I had to make a presentation for it and it was launched during the whole thing.
The only code I changed was to change the TargetPlatorm with RuntimePlatform, and it seems to work fine.
I've tried to find some log file to help me troubleshooting, but I couldn't find any

Thank you !

PS :
This is the only code i've had/change

if (Device.RuntimePlatform == Device.Android) {
sitebutton.Text = "Notre site";
}

And :

    string Family;
        switch (Device.RuntimePlatform)
        {
            case Device.iOS:
                Family = "Segoe";
                break;
            case Device.Android:
                Family = "Segoe.ttf#Segoe UI Light";
                break;
            default:
                Family = null;
                break;
        }

Best Answer

Answers

  • mathis01250mathis01250 ✭✭ FRMember ✭✭
    edited October 2018

    Couple of updates

    The emulator is oreo 8.1 API 27
    I've just tried on my android phone, API 22 and it works just fine
    I don't know what could cause the problem

    Edit : just tried emulator api 28 and it crashes too

  • mathis01250mathis01250 ✭✭ FRMember ✭✭

    Mmm ok..
    So I might not be able to fix this my self then :/
    Well, good thing it works on the real phone then, not very praticle but at least I can test it
    Thank you for you answer

  • NMackayNMackay mod GBInsider, University mod

    @mathis01250 said:
    Mmm ok..
    So I might not be able to fix this my self then :/
    Well, good thing it works on the real phone then, not very praticle but at least I can test it
    Thank you for you answer

    The Oreo emulator is a bit more stable, I use the 8.1 one.

  • mathis01250mathis01250 ✭✭ FRMember ✭✭

    ok, then this one crashes with my app, so I guess there is something wrong on my part.
    I have no clue how to solve the problem since I don't even know what's wrong :'(
    If only I could find a log file for the emulator

Sign In or Register to comment.