Application not starting in emulator? (VS2017)

Hi, i am completely new to Xamarin, but wanted to try it out after the release of VS2017 (running 15.0.0+26228.9). Following one of the tutorials i created a project using the singleview template and attempted to run it with the debugger.

I got a warning that my SDK needed updating, and so i followed the instructions and ran Android SDK manager from within VS. Amongst other things It updated "Android SDK Tools" to 25.2.5 and "Android SDK Platform-tools" to 25.0.4.

Re-running, started the emulator, but not the emulated device. At least nothing happened until i hit "power" in the emulator. Then the emulated device did start, but the application did not. At this point if i close the emulator VS2017 will be stuck in debug mode and i cannot exit it without terminating the VS process.

This is the output in the "Build" window on VS: https://gist.github.com/petertiedemann/3f5c3bd95c59a7fbe246ae0416125f96

OS: Windows 10 Enterprise with latest updates
Hyper-V enabled (also running docker in case that matters)

I hope someone can give me a hint on how to proceed?

Posts

  • kentuckerkentucker USMember ✭✭✭✭✭
    edited March 2017

    Open up the hyper-v manager on your computer and find the emulator you are using. Look at the processors setting when the emulator is stopped. Make sure the compatability checkbox is checked under processor. In the android project properties make sure FastDeploy is unchecked

  • PeterTiedemannPeterTiedemann USMember

    @kentucker said:
    Open up the hyper-v manager on your computer and find the emulator you are using. Look at the processors setting when the emulator is stopped. Make sure the compatability checkbox is checked under processor. In the android project properties make sure FastDeploy is unchecked

    So the default emulator i used so far is "AVD_GalaxyNexus_ToolsForApacheCordova (Android 4.4 - API 19)". Regardless of whether it is started or stopped, i see no trace of it in Hyper-V manager.

    If i try to use one of the x86 VisualStudio_android_23_* targets then it tells me to **disable **Hyper-V. I would rather not do that as i then need to reboot to use Docker.

    In case it is relevant i also get this when starting debugging:

    1>Your emulator is out of date, please update by launching Android Studio:
    1> - Start Android Studio
    1> - Select menu "Tools > Android > SDK Manager"
    1> - Click "SDK Tools" tab
    1> - Check "Android SDK Tools" checkbox
    1> - Click "OK"
    

    Having no idea what Android Studio is, i have tried locating the same settings in Visual Studio, but i have already updated the entries it mentions.

  • VulcanVulcan TWMember ✭✭✭
    You can use Visual Studio for Android Emulator
  • AshleyGazichAshleyGazich USMember, Xamarin Team Xamurai

    @PeterTiedemann

    Logs show 1>ERROR: resizing partition e2fsck failed with exit code 8. A related Stack Overflow post indicates restarting the Android SDK Manager and creating a new virtual device helped.

    Regarding Hyper-V, that’s likely going to cause issues with the Google emulator, since they tend to require it turned off. As mentioned, another option might be installing the Visual Studio Android emulator.

  • PeterTiedemannPeterTiedemann USMember

    @Vulcan @AshleyGazich The Visual Studio for Android Emulator worked, but i would never have guessed how to install it without that link from @AshleyGazich. Not the most user friendly experience overall.

  • Right click solution and Clean Solution followed by Build. It worked for me

Sign In or Register to comment.