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?
Answers
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
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
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.
@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...
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.
Any news on this? I have the same issue.
The workaround explained here worked for me.
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.
hihi
@Grazi Your Solution Worked For Me Too. I Am Using VS 2015 In Windows 10 Pro With Xamarin 4.1.1.
@Grazi Thank you!
@Grazi, Thank you! It worked for me too
Spent almost a day then this solution worked for me. Thank you!
Thank you sooo much @Grazi It did work for me too
Thank you @Grazi , finally works
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?
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.....
@lufo88 , have you tried reinstall Xamarin? I guess C:\Users[User]\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK it's where the SDK should be.
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
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!
Unfortunately after tried all these solutions still can't run the application in the emulator
its already checked and still can't see my project in the emulator
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
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.
Thankyou GRAZIELLA BONIZI it worked for me too.
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?
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? **
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...
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
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!
@Grazi Thank you. Worked for me
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:
Now the big question - what am I doing wrong?
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 [email protected]
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