Android emulator opens, but project does not deploy and start

When I try to use "Deploy" to deploy my app to any Android emulator, the emulator opens, but the deployment does not start. There is no error, and the only way to stop it is Ctrl+Break. I've waited up to 15 minutes. What do I need to look into in order to get this deployment to work successfully?

«13

Answers

  • Reeshabh1Reeshabh1 INMember

    I am also facing similar problems. Waiting for hours. I am working via VS 2015 and XAMARIn Android Player. Deployment and build are always successful

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭

    Oh! You guys have been waiting for minutes and hours only. I was waiting for days to find a solution to this issue. I don't know how many people get it working magically but for me and you...

  • Same problem here!

    I was following the "Hello Android" tutorial, and when I deploy the Phoneword application (Xamarin Android Player), the emulator starts, but I can´t see the app deployment.

    I found this, but in my case is not of help.

    http://stackoverflow.com/questions/24960717/xamarin-android-emulator-wont-run-application

  • RonaldCliffordRonaldClifford USMember

    It's not a speed issue. I should mention I've successfully used Android emulation with a past version of Xamarin on this same computer when I was trialing it some months ago.

    It is running the emulator fine. It is not even trying to deploy the application to the emulator. That is the issue.

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭

    @JEnriqueEspinosa The StackOverflow link you provided talks about the Android Player on Mac provided by Xamarin.

    So @RonaldClifford , I hope you were talking about VS Emulator for Android on Windows. I was also talking about the VS Emulator.

    As such I never had any issue with the Xamarin's Android Player on Mac. It is the VS Emulator that I have issues with. It never ran for me successfully. Sometimes I find the VS exits the debugger mode. But when I click on the apps icon in the apps list on the VS Emulator the app runs. Note **sometimes **only...

  • RonaldCliffordRonaldClifford USMember

    I also had that issue with the Visual Studio exiting debugger mode in the old version of Xamarin, but only rarely, and restarting debugging would fix it.

    Now it won't even deploy the application, though.

  • PatcorPatcor CHMember

    Any news on this? I have the same issue.

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭

    The workaround explained here worked for me.

  • ThoNguyenThoNguyen USMember

    hihi

  • Vijay.5883Vijay.5883 USMember

    @Grazi Your Solution Worked For Me Too. I Am Using VS 2015 In Windows 10 Pro With Xamarin 4.1.1.

  • KristianLoekkegaardKristianLoekkegaard DKMember ✭✭

    @Grazi Thank you!

  • ClaudyDetryClaudyDetry USMember

    @Grazi, Thank you! It worked for me too :smiley:

  • omkomk INMember

    @Grazi said:
    I solved it by accessing regedit.exe, navigating to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android, and changing the SDK path to my Xamarin Mono Android SDK folder.

    The path originally was C:\Users[User]\AppData\Local\Android\android-sdk
    then I changed to
    C:\Users[User]\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK
    thent it worked :)

    This link gave me the clue.

    Spent almost a day then this solution worked for me. Thank you!

  • AlbertQ18AlbertQ18 MXMember

    Thank you sooo much @Grazi It did work for me too

  • Thank you @Grazi , finally works :D

  • lufo88lufo88 USMember ✭✭✭
    edited August 2016

    Same problem. the solution of @Grazi not work (I haven't the sdk in C:\Users[User]\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK, it's in C:\Users[User]\AppData\Local\Android\android-sdk).
    in C:\Users[User]\AppData\Local\Xamarin\MonoForAndroid I have only a a keystore.
    I try to disable also fast deployment, nothing change.
    I can deploy on a device

    I try to deploy on a VS emulator, API 4.2
    Any idea?

  • StanleyGillmerStanleyGillmer USMember
    edited August 2016

    I've been trying hard to figure this out and it seemed that the Hyper-V manager option looked promising, however, Hyper-V manager can't be installed on Windows 7 (only the management tool gets installed) so if you get this problem as a Windows 7 user than following those steps don't help.

    Here is what worked for me and it's easy and quick to implement.

    Don't disable "Use fast deployment" as shown by some people.

    In Visual studio, make sure you choose the solution file (not project files) in the solution explorer. Then go "Project > [project]properties" in the left pane choose "Configuration Properties > Configuration" Now check the Deploy feature if possible. Only deployable projects have the option.

    This saved my life and I almost gave up on Xamarin. I really hope this helps others like me.....

  • GraziGrazi USMember

    @lufo88 , have you tried reinstall Xamarin? I guess C:\Users[User]\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK it's where the SDK should be.

  • lufo88lufo88 USMember ✭✭✭

    I reinstall xamarin about a week ago. My sdk is located in C:\Users[User]\AppData\Local\Android\android-sdk.

    I will try your suggest @StanleyGillmer

  • lufo88lufo88 USMember ✭✭✭

    @StanleyGillmer said:
    In Visual studio, make sure you choose the solution file (not project files) in the solution explorer. Then go "Project > [project]properties" in the left pane choose "Configuration Properties > Configuration" Now check the Deploy feature if possible. Only deployable projects have the option.

    Unfortunately it's already check. I can deploy only on real device.

  • Nasty little day breaker this one isn't it? Lufo88 after I got it working I was happy to continue and not look back. If you do get it sorted please post your findings here. This issue has many angles and the more we point out the quicker Xamarin will fix it. All the best!

  • GunnersGunners USMember

    Unfortunately after tried all these solutions still can't run the application in the emulator

  • GunnersGunners USMember

    @StanleyGillmer said:
    I've been trying hard to figure this out and it seemed that the Hyper-V manager option looked promising, however, Hyper-V manager can't be installed on Windows 7 (only the management tool gets installed) so if you get this problem as a Windows 7 user than following those steps don't help.

    Here is what worked for me and it's easy and quick to implement.

    Don't disable "Use fast deployment" as shown by some people.

    In Visual studio, make sure you choose the solution file (not project files) in the solution explorer. Then go "Project > [project]properties" in the left pane choose "Configuration Properties > Configuration" Now check the Deploy feature if possible. Only deployable projects have the option.

    This saved my life and I almost gave up on Xamarin. I really hope this helps others like me.....

    its already checked and still can't see my project in the emulator

  • ValerioFerreiraValerioFerreira BRUniversity, Developer Group Leader ✭✭

    A have to create this registry on Regedit:
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools]
    "Path"="C:\Users\++Your Account Here ++\AppData\Local\Android\sdk"

    The path is where the android SDK is installed.

    Maybe restart the computer or reinstall Emulator. I do not remenber what others necessary steps, but this is the solution!

  • @Grazi Thank you. Worked for me

  • DavidStrickland0DavidStrickland0 USMember ✭✭✭

    From the category of /facepalm
    One activity (MainActivity by default) must have
    [Activity(Label = "MyApp", Icon = "@drawable/icon", MainLauncher = true)]

    Without it the Emulator launchs and the app starts and ends so fast you never notice.

  • rajiv.codesrajiv.codes USMember

    Thankyou GRAZIELLA BONIZI it worked for me too.

  • @StanleyGillmer said:
    I've been trying hard to figure this out and it seemed that the Hyper-V manager option looked promising, however, Hyper-V manager can't be installed on Windows 7 (only the management tool gets installed) so if you get this problem as a Windows 7 user than following those steps don't help.

    Here is what worked for me and it's easy and quick to implement.

    Don't disable "Use fast deployment" as shown by some people.

    In Visual studio, make sure you choose the solution file (not project files) in the solution explorer. Then go "Project > [project]properties" in the left pane choose "Configuration Properties > Configuration" Now check the Deploy feature if possible. Only deployable projects have the option.

    This saved my life and I almost gave up on Xamarin. I really hope this helps others like me.....

    Hey, was it unchecked for you? It was already checked for me.

  • Guys, from what i have got on net - I found that Hyper-V is necessary to run Xamarin.Android with visual studio & for Hyper-V Windows 10 Home (which i have) doesn't meet the requirements. There's a deployment error coming whatever i try. You all got Hyper-V? So, it means i can't work on xamarin on my laptop? :disappointed:

  • Guys, from what i have got on net - I found that Hyper-V is necessary to run Xamarin Android with visual studio & for Hyper-V Windows 10 Home (which i have) doesn't meet the requirements. There's a deployment error coming whatever i try. You all got Hyper-V? **So, it means i can't work on xamarin on my laptop? ** :disappointed:

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭

    @VipulBhardwaj said:
    Guys, from what i have got on net - I found that Hyper-V is necessary to run Xamarin.Android with visual studio & for Hyper-V Windows 10 Home (which i have) doesn't meet the requirements. There's a deployment error coming whatever i try. You all got Hyper-V? So, it means i can't work on xamarin on my laptop? :disappointed:

    All current emulators use some form of VM. Hyper-V needs Windows Professional version. The 'Home' versions are not meant for development. Many of the development features need advanced machinery and OS. That is especially true for mobile development. You need lot of RAM, lot of CPU power, lot of graphics power etc.

    Of course you have a choice to use the Android native emulators which will take ages to start. So the alternative is to change your laptop.

    Remember the support for Windows 7 will be ending soon. If you are serious about mobile development...get a new all powerful machine. No escape...

  • ramphaniramphani INMember
    edited October 2016

    now open registry editor and move to the android-sdk folder as follows

    run=> regedit.exe,
    navigating to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android,
    and changing the SDK path......

    The path originally was C:\Users[User]\AppData\Local\Android\android-sdk
    then move to the path .....replace the path with android SDK location (check the path in visual studio.... ....goto tools => options =>xamarin =>Android settings ..... now check the android SDK location....)
    Eg:
    C:\Users[User]\Android\android-sdk

  • DavidKleckerDavidKlecker USMember

    @Grazi said:
    I solved it by accessing regedit.exe, navigating to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android, and changing the SDK path to my Xamarin Mono Android SDK folder.

    The path originally was C:\Users[User]\AppData\Local\Android\android-sdk
    then I changed to
    C:\Users[User]\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK
    thent it worked :)

    This link gave me the clue.

    This is the solution! This was my problem from the getgo! I use an external hard drive so I have moved my SDK elsewhere. Visual Studio or Xamarin just assumes its location. Surprised it doesn't look at the configuration where I have it defined.

    Thanks!

  • ArielBausArielBaus ARMember

    @DavidKlecker said:

    @Grazi said:
    I solved it by accessing regedit.exe, navigating to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android, and changing the SDK path to my Xamarin Mono Android SDK folder.

    The path originally was C:\Users[User]\AppData\Local\Android\android-sdk
    then I changed to
    C:\Users[User]\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK
    thent it worked :)

    This link gave me the clue.

    This is the solution! This was my problem from the getgo! I use an external hard drive so I have moved my SDK elsewhere. Visual Studio or Xamarin just assumes its location. Surprised it doesn't look at the configuration where I have it defined.

    Thanks!

    Just to expand on this answer, my SDK path in Windows 10 was:
    C:\Users[User]\AppData\Local\Xamarin\Universal\AndroidSDK
    Instead of:
    C:\Users[User]\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK

  • @Grazi thank you very much! You saved my day!

  • RAMANARAORAMANARAO USMember

    @Grazi Thank you. Worked for me

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭

    Hmmm... None of this is working for me. Working of the Android emulator on Windows was broken right from the beginning for me. It is a fluke that it works. This is what I did but in vain:

    1. Ever since I got my Surface Book and installed VS with Xamarin, my Android SDK was at ...\Local\Android\android-sdk. Then I could deploy to Android Emulator and debug apps. But it started misbehaving after one of the Xamarin updates.
    2. Then as suggested in other threads I did upgrade the Java Dev Kit to 1.8.0.
    3. Then I uninstalled Xamarin, Android SDK and reinstalled. Then also the SDK was installed at the above location only. Still it didn't work for me.
    4. Then as @Grazi 's solution is working for many, I did copy the Android SDK to ...\Local\MonoForAndroid\AndroidSDK directory. I also set the registry entry to this directory.
    5. STILL IT IS NOT WORKING FOR ME. The app deploys to emulator but crashes without any message.

    Now the big question - what am I doing wrong?

  • shadisymonshadisymon USMember
    edited November 2016

    hello
    I found solution for this problem
    1- run emulator from -- tools >>> visual studio emuliter
    2- lunch your device
    3- start your project

    not>> you most select same device

    1- https://my.pcloud.com/publink/show?code=XZE9dgZhnkTGeXQV1jIQXSEbQ6oz8DkD0Hk
    2- https://my.pcloud.com/publink/show?code=XZRMdgZfa7G3fgQLamKK7O0QFld4uj1L8hk
    3- https://my.pcloud.com/publink/show?code=XZ8MdgZAwk7XDNDLu5kD2wf2S5ljLJh25Q7
    4- https://my.pcloud.com/publink/show?code=XZjMdgZTuqEaWnPJgVUl78YjJGd6upIeKnV

    enjoy

    you can send to me in de.shadi.sy@gmail.com

  • shadisymonshadisymon USMember

    hello
    I have the same problem and tried all the ways until you come to that solution
    1- from list>> tools >> select (visual studio emulator for androad )
    https://my.pcloud.com/publink/show?code=XZE9dgZhnkTGeXQV1jIQXSEbQ6oz8DkD0Hk
    2- lunch your device
    https://my.pcloud.com/publink/show?code=XZRMdgZfa7G3fgQLamKK7O0QFld4uj1L8hk
    3- bulid your project
    https://my.pcloud.com/publink/show?code=XZ8MdgZAwk7XDNDLu5kD2wf2S5ljLJh25Q7
    4- enjoy with work
    https://my.pcloud.com/publink/show?code=XZjMdgZTuqEaWnPJgVUl78YjJGd6upIeKnV

    Important note: you must choose same device that has been it runs

«13
Sign In or Register to comment.