Android code is not loading into Emulator

KibokoKiboko Member ✭✭

I have developed an Android app that is almost complete. I have suddenly found that when I run VS 2017 Community ver 15.5.5 The Android Emulator starts up but the code is not being loaded into it. This means that I am no longer able to debug/test the code. Does anyone have any idea why that should be. The last time I ran the debugger was about 2 months ago and it was working fine. I am running Windows 10 and have had a few updates in the last few months.

Answers

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Google really fraked up interaction with their virtual machine manager for 3rd party apps like Visual Studio. Its not Microsoft's fault in this case.

    Odds are its timing out waiting for the VM to launch.

    Install Android Studio
    Using Android Studio to launch your Virtual Machine - and just keep it open for the entire day of work.

    Once the VM is running then have Visual Studio start debugging to it.

  • KibokoKiboko Member ✭✭

    Thanks for your very quick response, I will try that and post the result back here.

  • KibokoKiboko Member ✭✭

    I downloaded Android Studio and also the VM 23_x86_phone which is the one I developed against for a total of 5GB and it made no difference. I now get an compile message saying there were errors, but the errors tab in VS only shows a couple of warnings, namely Package 'Microsoft.Net.Http 2.2.29' was restored using '.NETPortable,Version=v0.0,Profile=net451+win8, .NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'.
    and the associated dependant library Microsoft.bcl
    Anyone got any other ideas?
    I am now installing .NetFramework Version v4.6.1 to see if that helps

  • KibokoKiboko Member ✭✭

    I get the status text that the project is being deployed but it still will not deploy. After downloading the .NetFramework Version v4.6.1 I can't see it in the project properties list of target frameworks any ideas anyone?

  • KibokoKiboko Member ✭✭

    Can anyone give me any more suggestions on this Emulator deployment issue please?

  • PierceBogganPierceBoggan USForum Administrator, Xamarin Team, Developer Group Leader Xamurai

    Hi @Kiboko,

    Could you please log this issue in Visual Studio via Help > Send Feedback > Report a Problem? This will include some diagnostic information that helps tracking down these tricky issues a bit easier. Additionally, could you attach a diagnostic build and deploy log?

    It seems like something may be going wrong with the incremental build/deploy. I noticed you are using Visual Studio 2017 version 15.5, which is ~8 months out of date from the latest stable release. You'll likely have better luck with that release.

    Thanks,
    Pierce Boggan

  • KibokoKiboko Member ✭✭

    Thanks very much Pierce, I actually solved the problem by creating a new project and transferring all the files into that. It now works like I expect it to. If it happens again, I will certainly take your advice regarding the diagnostic log and correct party to send it to
    regards
    Kiboko

Sign In or Register to comment.