locked
Android emulator opens, but project does not deploy and start RRS feed

  • Question

  • User149288 posted

    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?

    Wednesday, April 6, 2016 11:08 AM

All replies

  • User212499 posted

    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

    Wednesday, April 6, 2016 6:13 PM
  • User42522 posted

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

    Wednesday, April 6, 2016 7:08 PM
  • User212598 posted

    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

    Wednesday, April 6, 2016 10:05 PM
  • User149288 posted

    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.

    Thursday, April 7, 2016 1:13 AM
  • User42522 posted

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

    Thursday, April 7, 2016 2:39 PM
  • User149288 posted

    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.

    Friday, April 8, 2016 12:45 AM
  • User224615 posted

    Any news on this? I have the same issue.

    Thursday, May 12, 2016 7:46 AM
  • User42522 posted

    The workaround explained here worked for me.

    Thursday, May 12, 2016 1:42 PM
  • User237090 posted

    I solved it by accessing regedit.exe, navigating to HKEYLOCALMACHINE\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.

    Friday, July 1, 2016 2:32 AM
  • User222584 posted

    hihi

    Friday, July 8, 2016 7:44 AM
  • User181821 posted

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

    Tuesday, July 19, 2016 9:27 AM
  • User49629 posted

    @Grazi Thank you!

    Thursday, July 21, 2016 4:41 PM
  • User66857 posted

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

    Saturday, July 23, 2016 6:54 AM
  • User244168 posted

    @Grazi said: I solved it by accessing regedit.exe, navigating to HKEYLOCALMACHINE\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!

    Saturday, July 23, 2016 5:02 PM
  • User243208 posted

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

    Sunday, August 14, 2016 1:21 AM
  • User252145 posted

    Thank you @Grazi , finally works :D

    Thursday, August 25, 2016 3:08 PM
  • User43648 posted

    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?

    Wednesday, August 31, 2016 8:34 AM
  • User253499 posted

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

    Wednesday, August 31, 2016 12:42 PM
  • User237090 posted

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

    Wednesday, August 31, 2016 1:47 PM
  • User43648 posted

    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

    Wednesday, August 31, 2016 1:50 PM
  • User43648 posted

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

    Thursday, September 1, 2016 6:44 AM
  • User253499 posted

    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!

    Thursday, September 1, 2016 7:05 AM
  • User256163 posted

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

    Sunday, September 11, 2016 6:47 PM
  • User256163 posted

    @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

    Sunday, September 11, 2016 6:49 PM
  • User43923 posted

    A have to create this registry on Regedit: [HKEYLOCALMACHINE\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!

    Tuesday, September 13, 2016 12:33 PM
  • User241444 posted

    @Grazi Thank you. Worked for me

    Tuesday, September 20, 2016 8:16 PM
  • User158279 posted

    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.

    Tuesday, September 20, 2016 9:23 PM
  • User263575 posted

    Thankyou GRAZIELLA BONIZI it worked for me too.

    Friday, October 7, 2016 6:10 AM
  • User264458 posted

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

    Monday, October 10, 2016 9:19 PM
  • User264458 posted

    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:

    Monday, October 10, 2016 9:25 PM
  • User264458 posted

    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:

    Monday, October 10, 2016 9:26 PM
  • User42522 posted

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

    Tuesday, October 11, 2016 1:27 PM
  • User268286 posted

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

    run=> regedit.exe, navigating to HKEYLOCALMACHINE\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

    @@@@@

    Monday, October 24, 2016 7:34 AM
  • User266012 posted

    @Grazi said: I solved it by accessing regedit.exe, navigating to HKEYLOCALMACHINE\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!

    Thursday, October 27, 2016 2:28 PM
  • User269230 posted

    @DavidKlecker said:

    @Grazi said: I solved it by accessing regedit.exe, navigating to HKEYLOCALMACHINE\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

    Thursday, October 27, 2016 8:33 PM
  • User271227 posted

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

    Wednesday, November 9, 2016 8:46 AM
  • User262420 posted

    @Grazi Thank you. Worked for me

    Thursday, November 10, 2016 5:45 PM
  • User42522 posted

    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?

    Thursday, November 17, 2016 3:34 PM
  • User253858 posted

    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

    Saturday, November 19, 2016 12:38 PM
  • User253858 posted

    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

    Sunday, November 20, 2016 1:26 PM
  • User269328 posted

    baaal same problem

    Monday, November 21, 2016 12:21 PM
  • User42522 posted

    @shadisymon said: 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

    No use...see the attached screenshot. It doesn't even deploy to the emulator...

    Monday, November 21, 2016 2:43 PM
  • User275516 posted

    this might help you. stackoverflow.com/a/32564067/7009636

    7 Step answer

    Tuesday, November 22, 2016 3:17 PM
  • User67225 posted

    @Grazi said: I solved it by accessing regedit.exe, navigating to HKEYLOCALMACHINE\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.

    Thanks @Grazi Save my dayS.. been working on it for a long time!

    Tuesday, November 29, 2016 11:17 AM
  • User280102 posted

    @Grazi Thanks.. It works for me :smile:

    Wednesday, November 30, 2016 10:20 AM
  • User277454 posted

    I've applied these 2 solutions and now it works!!

    Without it the Emulator launchs and the app starts and ends so fast you never notice.> @Grazi said:

    I solved it by accessing regedit.exe, navigating to HKEYLOCALMACHINE\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.

    @DavidStrickland0 said: 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.

    Thanks!

    Saturday, December 3, 2016 1:15 PM
  • User272124 posted

    Hey u guys!

    I had the same problem, but in some cases everything works fine and in projects that I downloaded from internet many times isn't work. I'm using VS2015.

    For me this was the solution:

    1. Go to the Project Properties -> Build;
    2. Verify if you have a Platform Target and Platform;
    3. If not, customize one Platform Target for the entire solution: x86 or x64;
    4. I used x64 and now everything works for Android deploy.
    Monday, December 5, 2016 2:58 AM
  • User79846 posted

    @ramphani solution work for me!

    Monday, December 26, 2016 6:48 AM
  • User253858 posted

    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

    Friday, December 30, 2016 4:13 PM
  • User289570 posted

    This worked for me for the Android emulator: right-click on the Android project > Properties > Android Option > Deselect "Use Fast Deployment" from the Packaging tab > Save

    Monday, January 9, 2017 12:51 AM
  • User289570 posted

    I also had a warning to install the Xamarin Android Player. Here's the link where it's available at:

    https://developer.xamarin.com/releases/android/android-player/

    Monday, January 9, 2017 12:55 AM
  • User289061 posted

    I had to do a combination of the above to get mine Android side to work.

    1.Go to the Project Properties -> Build; 2.Verify if you have a Platform Target and Platform; 3.If not, customize one Platform Target for the entire solution: x86 or x64; 4.I used x64 and now everything works for Android deploy.

    and

    right-click on the Android project > Properties > Android Option > Deselect "Use Fast Deployment" from the Packaging tab > Save

    But Thanks you guys!!!

    Thursday, February 2, 2017 3:36 PM
  • User54022 posted

    @shadisymon thanks a lot, after months of trying your method worked for me.

    Sunday, February 12, 2017 11:53 PM
  • User206690 posted

    For me worked the solution of @Avalon. I have a pretty complex solution with 18 projects in Android configuration (38 projects in total, but this number is comprehensive of web and Windows Phone platforms). Just uncheck 'Fast deployment' option has solved. Thanks

    Friday, February 17, 2017 2:30 PM
  • User301150 posted

    Hi guys, first of all this is not a problem on your solution. The version mismatching (api levels) may cause this kinds of problems, i suggest you to just clean and rebuild your solution and create a new AVD with suitable configuration and run the solution. It will works. Happy coding.............

    Saturday, February 18, 2017 1:02 PM
  • User88553 posted

    This works for me:

    Friday, March 3, 2017 7:30 AM
  • User213428 posted

    If anyone has problems deploying to the emulator after upgrading Xamarin, go into settings and then apps on the emulator and make sure to uninstall the Xamarin stuff there. Uninstall your app, Mono Shared Runtime and Xamarin.Android API-XX Support.

    Monday, March 6, 2017 8:52 PM
  • User292466 posted

    I'm looking for a solution yet

    Tuesday, March 7, 2017 10:41 AM
  • User303423 posted

    I tried all suggestions above but in my case none of them work. After some more troubleshooting I was able to figure it out on Windows 10 home edition. I removed any standalone installation of Xamarin and used only what Visual Studio Installer offers to install Xamarin (mobile cross-platform development for .Net) In Visual Studio do Ctrl-Alt-O to show the output window so you can see any error popping up during emulator launch and app deployment. In your emulators, make sure that the SD Card size in the emulator's configuration is big enough. I am using 1024 MB. I noticed in the VS IDE Output window that a message was coming as - not enough disk space. After increasing the SD card and recreating the emulator that you want to use, launch the emulator independently using Android SDK Tools -> AVD Manager. Go to the Apps section in the emulator (circle with little dots) and make sure you uninstall your application from the emulator. After that, open VS and load your solution. Select the emulator in VS that matches the one already running, and click the button to start building and deploying your app. (Your emulator Android version and API level need to be equal or greater than the Target Framework in your app's android manifest). After that you will see how your app gets deployed to the emulator. Once you are done testing your app, make sure you uninstall it again. You can leave the emulator running all the time. VS debugger will stop as soon as the app gets removed from the emulator. At that point you can make any changes to your app and redeploy as many times as you need without the need of launching the emulator every time.

    Friday, March 10, 2017 7:36 PM
  • User307448 posted

    Hello Everyone,

    Same problem i am also facing. I have installed VS2017, on windows 7 professional. I am beginner to xamarin, i have created my first Hello Android application, and configured new Nexus 5 custom emulator using Android Virtual Device(AVD) manager by cloning Nexus 5. Everything worked fine and emulator started but my application is not getting deployed. searched a lot and tried to change the path as mentioned above,

    C:\Users[User]\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK

    There is no such path(HKEYLOCALMACHINE\SOFTWARE\Wow6432Node\Android) in my system as suggested in the above link.

    So thought it might by an OS issue please let me know if its a OS issue ? if not what is the solution for the above issue ? so that i can deploy App on emulator successfully.

    Sunday, March 12, 2017 11:54 AM
  • User229758 posted

    Good afternoon people,

    I have solved this problem easily, I believe that I must leave my contribution to the community, then it follows:

    In VS2015 go to the menu Tools> Android> Restart ABD Server.

    And it worked out that was a marvel.

    I hope it helps.


    Boa Tarde pessoal,

    Resolvi este problema de modo fácil, acredito que devo deixar minha contribução para a comunidade, então segue:

    No VS2015 vá até o menu Tools > Android > Restart ABD Server.

    E funcionou que foi uma maravilha.

    Espero que ajude.

    Saturday, March 18, 2017 8:13 PM
  • User18582 posted

    @JefterDorea if you are needing to do that, you most likely have more than 1 android sdk with another ADB server running.

    Sunday, March 19, 2017 7:23 AM
  • User294244 posted

    @Grazi thank you for sharing your solution !!!! You saved my life.. I was stuck on this for ages ...

    Sunday, March 19, 2017 2:33 PM
  • User144946 posted

    @Grazi thx =D

    Friday, March 24, 2017 6:45 PM
  • User270940 posted

    @MichaelCheng I came across your post and it help me fix my issue for running on a HAXM emulator. Thanks!

    Monday, April 3, 2017 5:12 AM
  • User313949 posted

    @lufo88 said: 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?

    Did you find a solution?

    Wednesday, April 5, 2017 12:03 PM
  • User142461 posted

    Open Registry Editor by selecting Run from the Start buttons context menu, typing regedit in the dialog box, and choosing OK. Navigate to HKEYLOCALMACHINE\SOFTWARE\Wow6432Node\Android SDK Tools in the folder tree on the left. Modify the Path registry variable to match the path to your Android SDK.

    Wednesday, April 5, 2017 12:59 PM
  • User318788 posted

    @Grazi said: I solved it by accessing regedit.exe, navigating to HKEYLOCALMACHINE\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.

    ~~Lovely! this still works ~~ Nope the application icon (Xamarin Logo) appeared for a while and vanished.

    I must say Google is rigid for this OR VS 2017 when allowed changing via their toolbox should have updated in registry too!.

    N Baua

    Sunday, April 23, 2017 6:34 AM
  • User319216 posted

    @JefterDorea works for me and its a brand new install - thanks!

    Friday, April 28, 2017 6:31 AM
  • User229758 posted

    @AllanPead said: @JefterDorea if you are needing to do that, you most likely have more than 1 android sdk with another ADB server running.

    ====================================

    Glad to have contributed. Big hug

    Friday, April 28, 2017 8:37 PM
  • User322913 posted

    I had the same issue on Win 10 Home and VS 2017 (latest updates applied to both at the time of this post). For me the issue got fixed after I installed the latest Android SDK updates from Tools -> Android -> Android SDK Manager

    Wednesday, May 24, 2017 9:01 AM
  • User318788 posted

    Need to run the updates multiple times. It did fixed in the end. :wink:
    N Baua

    Thursday, May 25, 2017 10:37 AM
  • User322913 posted

    Like others suggested, other things to try are 1. Restart the adb sever from Tools -> Android -> Restart Adb server 2. Disable Fast Deployment by right clicking on Android project in your solution -> Properties -> Android Options tab -> uncheck "Use Fast Deployment"

    Thursday, May 25, 2017 8:22 PM
  • User308375 posted

    @Grazi Thank you for your solution! it works for me. However my address is a little bit different.

    C:\Users[User]\AppData\Local\Xamarin\Mono for Android In this address, there is not the AndroidSDK folder on my computer.

    So I referred to @ArielBaus

    my address which has the AndroidSDK folder is C:\Users[User]\AppData\Local\Xamarin\Universal\AndroidSDK

    So I changed C:\Users[User]\AppData\Local\Android\android-sdk into C:\Users[User]\AppData\Local\Xamarin\Universal\AndroidSDK

    after editting like this, my project is being uploaded well on the emulator

    Thanks!

    Monday, May 29, 2017 5:23 PM
  • User323063 posted

    If all above still fails, you could try these: * Right click your project -> Debug -> Start new instance * Relocate your project into a path with no special characters, including spaces

    There might some occasion that your app won't automatically launch by adb, in that case, you will manually launch it.

    Wednesday, June 7, 2017 5:16 AM
  • User281968 posted

    @ValerioFerreira Your solution for updating the Android SDK path on the registry Worked for me. Thank you

    Thursday, June 8, 2017 12:23 PM
  • User328246 posted

    I have tried every solution but nothing worked for me in VS 2017. The strange is also that my android sdk is located in C/ProgrammeFiles(X86)/Android/android-sdk. I can not deploy the app neither on physical device nor in emulator. I used google emulator and vs emulator but nothing. Any other suggestion?

    Thursday, June 8, 2017 7:16 PM
  • User329692 posted

    Changing your Android app extension from XXX.Android to XXX.Droid solves the issue. This is due a conflict with the "Android" word

    Friday, June 9, 2017 9:04 PM
  • User330115 posted

    For me it was just the cache. Uncheck that box.

    Monday, June 12, 2017 3:50 PM
  • User331799 posted

    @shadisymon said: 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

    Thanks. This worked for me. Quite a bummer. Have no idea why some solutions work and some don't.

    Cheers.

    Thursday, June 22, 2017 9:53 PM
  • User213428 posted

    @elisat said: For me it was just the cache. Uncheck that box.

    It should work with that option selected, it does for me. And it's a very useful option, especially if your app has login.

    Friday, June 23, 2017 10:01 AM
  • User318788 posted

    @Harteex said:

    It should work with that option selected, it does for me. And it's a very useful option, especially if your app has login.

    Great, Never knew that could save lives. Though, I would rather use other means to retain the AppLogin values then to rely on cache entirely. Thanks for sharing though, Most of the times, you never know with Xamarin what makes and what breaks your things.

    Regards, N Baua

    Friday, June 23, 2017 10:13 AM
  • User313644 posted

    @Grazi Thanks very much. That worked for me - thought I was going crazy!

    Thursday, July 27, 2017 2:41 PM
  • User341254 posted

    Make sure 'mainactivity' class is the first class in line immediately after [Activity(Label = "App1", MainLauncher = true, Icon = "@drawable/icon")]

    Worked for me...

    Wednesday, August 9, 2017 10:00 AM
  • User343784 posted

    Hi! I had a bad time trying to simulate my app (I am a newbie) but this is the solution: When the emulator opens go to Settings (inside the emulator, like the phone settings), then About emulated device and then tap seven times the Build number section. After that it will show that you are a developer. Go to Settings and then Developer options and enable the USB debugging.

    Tuesday, August 22, 2017 3:48 PM
  • User42522 posted

    @Piyi said: Hi! I had a bad time trying to simulate my app (I am a newbie) but this is the solution: When the emulator opens go to Settings (inside the emulator, like the phone settings), then About emulated device and then tap seven times the Build number section. After that it will show that you are a developer. Go to Settings and then Developer options and enable the USB debugging.

    It is strange that you have to do this on an emulator. I have never done that on a emulator. But if it resolved your issue, that's it...

    Tuesday, August 22, 2017 7:01 PM
  • User333460 posted

    @Grazi Thank you very much, your Solution Works like a charm! ;)

    Thursday, August 24, 2017 4:17 AM
  • User141766 posted

    @Grazi thanks

    Monday, September 4, 2017 3:19 AM
  • User348862 posted

    @Grazi Tanks a Lot

    Monday, September 18, 2017 3:44 AM
  • User349275 posted

    FYI, I had a similar problem on my Mac where I was silently unable to deploy to Android devices or emulators, even outside of Visual Studio for Mac. Inspired by @Grazi's solution, I renamed ~/Library/Developer/Xamarin/android-sdk-macosx and it resolved the issue. I'm assuming this was caused by two conflicting Android SDKs.

    Tuesday, September 19, 2017 11:05 PM
  • User168623 posted

    thanks to GRAZIELLA BONIZI this link working for me <3

    Saturday, September 30, 2017 4:50 PM
  • User351573 posted

    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 am new with xamarin, please help me. Thanks in advance.

    Tuesday, October 3, 2017 2:44 AM
  • User310920 posted

    @Grazi said: I solved it by accessing regedit.exe, navigating to HKEYLOCALMACHINE\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.

    It was like a magic for me. Many thanks for the solution :)

    Thursday, October 5, 2017 12:34 PM
  • User354877 posted

    @lufo88 said:

    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?

    same issue.

    In my case, I just delete all emulator then make one and retry. finally solute.

    Tuesday, October 24, 2017 4:54 AM
  • User340021 posted

    @shadisymon it worked for me. thanks!

    Thursday, November 9, 2017 4:49 AM
  • User363602 posted

    I had the same problem. I followed @Grazi 's solution. I didn't have 'Android' key in HKEYLOCALMACHINE\SOFTWARE\Wow6432Node, so I created myself. I find my Android SDK's path from VS > Tools > Options > Xamarin > Android SDK Location. But it didn't solve the problem.

    I just started the emulator via AVD and then deployed the solution from Build > Deploy Solution. Deployment is successful this way but you still need to start and run the installed app yourself.

    Saturday, December 16, 2017 11:55 AM
  • User307217 posted

    @"VijayPawar.0297" said: this might help you. [stackoverflow.com/a/32564067/7009636]...

    7 Step answer

    After a fresh installation of VS 2017 Community 15.5.2 on a new laptop, this solution worked for me, thanks!

    Sunday, December 24, 2017 6:22 PM
  • User307217 posted

    And additionally I needed a permanent fix... that I found at Microsoft's troubleshooting page under section:

    Visual Studio gets stuck trying to deploy the app to the emulator or the emulator does not appear as a debug target in other IDEs

    If the emulator is running, but it does not appear to be connected to ADB (Android Debug Bridge) or it does not appear in Android tools that make use of ADB (for example, Android Studio or Eclipse), you may need to adjust where the emulator looks for ADB. The emulator uses a registry key to identify the base location of your Android SDK, and looks for the \platform-tools\adb.exe file under that directory. To modify the Android SDK path used by the emulator:

    Open Registry Editor by selecting Run from the Start buttons context menu, typing regedit in the dialog box, and choosing OK.

    Navigate to HKEYLOCALMACHINE\SOFTWARE\Wow6432Node\Android SDK Tools in the folder tree on the left.

    Modify the Path registry variable to match the path to your Android SDK.

    Restart the emulator and you should now be able to see the emulator connected to ADB and associated Android tools.

    Sorry, i'm not allowed to post links yet.

    Basically what @Grazi posted, but for me the "Android SDK Tools" folder didn't exist. So I created it and added a New String value with Value name: "Path" and Value data: "C:\Program Files (x86)\Android\android-sdk" which matched with the path to my Android SDK folder.

    Wednesday, December 27, 2017 10:54 AM
  • User8903 posted

    On a fresh install of Visual Studio 2017 Enterprise on Windows 10 Professional.

    @Grazi 's solution worked for me. Sort of.

    The key name is "HKEYLOCALMACHINE\SOFTWARE\Wow6432Node\Android SDK Tools"

    On my machine, this key didn't even exist. I created it, then added a value under it called Path with the value "C:\Program Files (x86)\android\android-sdk"

    This is what finally worked for me.

    Wednesday, February 21, 2018 9:52 PM
  • User8903 posted

    Incidentally, one of the solutions on microsoft's web site (the link I can't post, because I haven't "been around long enough") says that I should try defragging my hard drive. I'm rolling my eyes so hard they can hear it in the next county.

    Wednesday, February 21, 2018 9:56 PM
  • User366261 posted

    I struggled with this and then found an easy solution: go in the emulator to apps and delete the app where you are working on. Try to run the app again and it worked :)

    Friday, March 16, 2018 2:40 PM
  • User366902 posted

    @MojtabaJavan said: I had the same problem. I followed @Grazi 's solution. I didn't have 'Android' key in HKEYLOCALMACHINE\SOFTWARE\Wow6432Node, so I created myself. I find my Android SDK's path from VS > Tools > Options > Xamarin > Android SDK Location. But it didn't solve the problem.

    I just started the emulator via AVD and then deployed the solution from Build > Deploy Solution. Deployment is successful this way but you still need to start and run the installed app yourself.

    Thanks @MojtabaJavan supplement on @Grazi solution for those do not find the key in regedit. Let me rexplain with more detail. For those who cannot find HKEYLOCALMACHINE\SOFTWARE\WOW6432Node\Android SDK Tools, please create Android SDK Tools key yourself and then create a String Value named Path with value C:\Program Files (x86)\Android\android-sdk (Please verify if this path is same as yours).

    If you still cannot deploy the app especially those who stuck at (AppName).Android -> (Path)\bin\Debug(AppName).Android.dll, try to press ctrl+break in VS. Your building process will be terminated without closing the emulator and then press debug button again, your app will be deployed. <- this method should be attempted for the next 2 methods if which is needed. (Attempt 1)

    If the app is still not be deployed by the above method (especially who is running in an VM guess environment or with Visual Studio Emulator for Android), close the emulator and go to the desktop app Hyper-V Manager and right click on the Virtual Machine that you were running in VS and choose Settings..., then go to Processor -> Compatibility and check Migrate to a physical computer with a different processor version. After that you can try to debug again.

    If the above workaround don't even work. The final try should be right click on your Android Project and choose Properties. Go to Android Options and uncheck Use Fast Deployment (debug mode only).

    Don't forget to do (Attempt 1) for the above 2 workarounds!

    Wednesday, April 4, 2018 1:47 AM
  • User366271 posted

    @Sw1ma said: And additionally I needed a permanent fix... that I found at Microsoft's troubleshooting page under section:

    Visual Studio gets stuck trying to deploy the app to the emulator or the emulator does not appear as a debug target in other IDEs

    If the emulator is running, but it does not appear to be connected to ADB (Android Debug Bridge) or it does not appear in Android tools that make use of ADB (for example, Android Studio or Eclipse), you may need to adjust where the emulator looks for ADB. The emulator uses a registry key to identify the base location of your Android SDK, and looks for the \platform-tools\adb.exe file under that directory. To modify the Android SDK path used by the emulator:

    Open Registry Editor by selecting Run from the Start buttons context menu, typing regedit in the dialog box, and choosing OK.

    Navigate to HKEYLOCALMACHINE\SOFTWARE\Wow6432Node\Android SDK Tools in the folder tree on the left.

    Modify the Path registry variable to match the path to your Android SDK.

    Restart the emulator and you should now be able to see the emulator connected to ADB and associated Android tools.

    Sorry, i'm not allowed to post links yet.

    Basically what @Grazi posted, but for me the "Android SDK Tools" folder didn't exist. So I created it and added a New String value with Value name: "Path" and Value data: "C:\Program Files (x86)\Android\android-sdk" which matched with the path to my Android SDK folder.

    The last bullet point here did it for me. 5 hours later and i am back to normal... for now.... Thank you sir!

    Tuesday, May 29, 2018 4:23 PM
  • User370665 posted

    @Grazi Thank you!

    Wednesday, July 11, 2018 3:30 AM
  • User393720 posted

    @ramphani said:

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

    run=> regedit.exe, navigating to HKEYLOCALMACHINE\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

    @@@@@

    when I checked this path navigating to HKEYLOCALMACHINE\SOFTWARE\Wow6432Node\Android I do not have Adroid item why?

    Saturday, April 4, 2020 10:58 AM
  • User315091 posted

    Thanks @Grazi, it works for me!

    Monday, March 29, 2021 5:30 AM