locked
Application not starting in emulator? (VS2017) RRS feed

  • Question

  • User309921 posted

    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?

    Saturday, March 18, 2017 6:29 PM

All replies

  • User96159 posted

    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

    Sunday, March 19, 2017 1:55 PM
  • User309921 posted

    @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 "AVDGalaxyNexusToolsForApacheCordova (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 VisualStudioandroid23_* 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.

    Sunday, March 19, 2017 5:38 PM
  • User97202 posted

    You can use Visual Studio for Android Emulator

    Monday, March 20, 2017 3:00 AM
  • User131278 posted

    @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.

    Wednesday, March 22, 2017 6:22 PM
  • User309921 posted

    @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.

    Sunday, March 26, 2017 7:18 AM
  • User342610 posted

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

    Wednesday, August 16, 2017 6:40 PM