Visual Studio 2017 stuck deploying to device hosted on Visual Studio emulator for Android

I gave up on the stock Android SDK ADV manager because of reasons detailed in a post that has disappeared from this forum. What I ended up doing was to lean towards Visual Studio emulator for Android instead, which offers for operational compatibility since it uses Hyper-V. It has not been smooth sailing (forums.xamarin.com/discussion/105752/visual-studio-emulator-for-android-asking-for-haxm-instead-of-hyper-v) , but at least it worked way better than the stock emulator.

Last night I tried to evaluate the sample weather app - part of the sample library from Github - and skipping problems encountered with VS2017 not liking the Windows/Windows Phone projects, compiling and deploying to the virtual device (5.7" Marshmallow (6.0.0) XHDPI Phone) was actually fine and I could debug the code. Except that it needed an API key, which on registration of account with openweathermap.org does not allow immediate use of its API keys. I retired for the night and decided to try the next day.

Today when I launch VS2017 and deploy to the virtual device again, the app did launch and the debugger could attach. But the moment I hovered over the variable I had a breakpoint for, VS got stuck trying to retrieve values to render the tooltip. In that state of complete unresponsiveness, I shut the emulator, and killed devenv.exe since it wouldn't recover.

Now on subsequent re-launch of VS2017 and re-deploy to the device (which runs fine on its own), VS just gets stuck at random stages of the deployment process. There're so compile errors, just that is seems to be engaged in some lengthy or broken activity with the virtual device. The app never launches, thus no debugger attachment.

As of this fourth attempt, the Output stage last shows

1>Skipping target "_AddStaticResources" because all output files are up-to-date with respect to the input files.
1>Skipping target "_CreateBaseApk" because all output files are up-to-date with respect to the input files.
1>Skipping target "_CompileJava" because all output files are up-to-date with respect to the input files.
1>Skipping target "_CompileToDalvikWithDx" because all output files are up-to-date with respect to the input files.
1>Skipping target "_BuildApkFastDev" because all output files are up-to-date with respect to the input files.
1>Skipping target "_CopyPackage" because all output files are up-to-date with respect to the input files.
1>Touching "obj\Debug\android_debug_keystore.flag".
1>Skipping target "_Sign" because all output files are up-to-date with respect to the input files.

I cannot do anything other than to close the emulator and kill devenv.exe again. In fact, there is all I can do in this situation. Build/deploy to make VS2017 hang, that's it. Haven't made any headway towards even a little more advanced use of Xamarin.Forms and mobile development.

The build must be stopped before solution can be closed.

What sort of behaviour am I observing here between VS2017 and the emulator? How do I go about getting them to cooperate like they did seemingly fine last night?

Answers

  • icelavaicelava USMember ✭✭

    *Correction: There' no compile errors, just that is seems to be engaged in some lengthy or broken activity with the virtual device.

  • XamITXamIT USMember ✭✭

    Hi @icelava , I am in the same boat as your experience.

    I am not convinced either to switch between HAXM and Hyper-V.

    Since setting up VS Emulator devices, I am experiencing the same thing in VS 2017 15.5.2 that app doesn't get deployed in the emulator after it is up and running.

    I am still trying hard to give up on Xamarin and Visual Studio as a tooling for mobile app development.

    In numerous posting of request and reporting errors - I also found the community forum here is not as responsive - especially team members from Xamarin.

    This has been a truly frustrating experience, as the ramp up time to set up your environment for learning this technology is such a painful and not supported while there is a huge propaganda on the roadmap and the future capabilities which we can't even appreciate until we are ready to take off from the bare bone foundational set up.

    Xamarin and Microsoft teams, we truly hope you are reading this closely and listening to our pain and requests.

    Thanks,
    XamIT

  • XamITXamIT USMember ✭✭

    Hi @icelava, any progress on your end?
    I am yet to see my app deployed in the VS Android emulator.
    So far, I haven't seen any config that will allow VS to deploy the app in that emulator.

    Thanks,
    XamIT

  • icelavaicelava USMember ✭✭

    Hey XamIT, Microsoft's Visual Studio emulator for Android is the one that makes use of Hyper-V. HAXM is for Google's stock Android SDK emulator. What I've learnt is, Microsoft has actually ceased development of their own (Hyper-V) emulator in favour of the original Android SDK. Therefore there are no additional device images for the latest API levels.

    I have not found any real answer and solution to the problem; personally I have ceased study on mobile app development as a whole since I was just researching something.

Sign In or Register to comment.