Android Emulator not sync with VS 2015 - visual-studio

I am having some issue when running a Xamarin.Forms application in the Android Emulator using Visual Studio 2015. At the beginning everything was working OK. Every time I did a change either in XAML or C#, when I rerun the emulator I can see the changes (without closing it).
Now, for some reason if I do the same, those changes are not applied in the Android Emulator. In order to see any change, I need to close the emulator and click the green play button again every time.
For example, if I want to change the FontColor of a label to be Blue instead of Black in XAML, before just clicking the restart button was enough to see the change. For any C# change, clicking the stop button and then the play button was enough as well.
Now, to see the same result I have to close the emulator and reload it again. Which take some time.
Has anyone have faced the same problem? Any help/ clue would be ver helpful?
Thanks!

#MikePR
I suggest to get rid of the Hyper-V based VS Android Emulator and use the Intel HAXM
native Emulator. I experienced much simular
issues with Hyper-V emulator, too.
Or much better get rid of any emulator and use
vysor.io and visualize your real device like an
emulator on your desktop. My personal favorit.
Hope it is helpful.
PS: Never in life use GenyMotion. That doesn't work in Remote Desktop Sessions and only runs
on windows machines with OpenGL 2.0 installed
and HAXM and Hyper-V disabled. I currently had that disappointing experience.
A really cool tool for XAML Preview is Gorilla Player!

Related

Can I run the Android Emulator within (or on top of) the Android Studio window?

I use Android Studio on macOS in full screen (maximised). When launching the Android Emulator, its window is shown on the regular desktop. This requires switching from one window to another. I'd like to be able to look at both windows at the same time, without leaving full screen mode in Android Studio.
Is there a way to move the Android Emulator window to within (or on top of) my Android Studio window?
With Android Studio 4.1 and above you can run the Android Emulator directly in Android Studio.
To run the emulator in Android Studio, make sure you're using Android Studio 4.1 with version 30.0.10 or higher of the Android Emulator, then follow these steps:
Click File > Settings > Tools > Emulator (or Android Studio > Preferences > Tools > Emulator on macOS), then select Launch in a tool window and click OK.
If the Emulator window didn't automatically appear, open it by clicking View > Tool Windows > Emulator.
Start your virtual device using the AVD Manager or by targeting it when running your app.
For more info: Run the Android Emulator directly in Android Studio
This is not a 100% answer, but near to it and since it doesn't fit in comments, I'll write it here. Hopefully we can turn it into a 100% answer.
It is possible to do this with applications that supports full screen mode. Unfortunately the Android emulator does not do this. Genymotion does.
There seem to be hacks to activate full screen mode for applications that don't support it natively. For example, for the iOS simulator, you have to run this on a terminal:
defaults write com.apple.iphonesimulator AllowFullscreenMode -bool YES
A Google search returns several results to do this with the Android Emulator: https://www.google.com/search?q=how+to+run+android+emulator+full+screen&rlz=1C5CHFA_enDE822DE822&oq=how+to+run+android+emulator+full+screen&aqs=chrome..69i57.6269j0j9&sourceid=chrome&ie=UTF-8
I've not tested any of them, so that's left as an exercise to the reader. If you do successfully please write it in the comments (or directly edit this post with the steps).
It may also make sense to make a feature request on the emulator to enable full screen mode.
Once you have an emulator/simulator that supports full screen mode, you can use MacOS's split view feature. In order to do this:
Press and hold the full screen button on Android Studio (while not in full screen mode).
Move it to the left part of the screen.
Now in the right part you will see "candidates" to share the full screen with. Your simulator/emulator should appear here. Click on it. It should expand to fill the right half of the screen.
Drag the handle between the left and right part to the right, such that Android Studio occupies more space.
See https://support.apple.com/en-au/HT204948
I also looked into this and there doesn't seem to be any support for this. Perhaps you could write a plugin that somehow wraps an external window inside a panel, I don't know if the IntelliJ API supports it though.
The closest thing you got on macOS is the split-screen mode with full-screen apps.

vs emulator works but application doesn't work properly

I created new blank app in xamarin and i didn't change anything in code view.
When I try to run app. Emulator works good but app doesnt run in emulator. I am using VS 2015 Enterprise Version:14. My operating system is Win10 Enterprise
-VS
Right mouse click on solution. Select Configuration Manager. Select Deploy.
Sometimes it gets stack (check green bottom bar in visual studio). If green bar stays full and doesn't go away restart emulator.
Another reason can be that there is no MainLauncher Activity is defined.

Visual Studio Android Emulator Is Not Running the Application

When I deploy/run the Xamarin.Android app in Visual Studio (either pressing ctrl+F5 or play-button in toolbar), the Visual Studio launches its emulator for android (Note: It is "Visual Studio Emulator For Android", not SDK or any other emulator) without any difficulty and within a reasonable amount of time which works fine. But the problem is that it does not automatically run that app. Neither does it show any icon to run it.
I have not had much success with the emulator built in to VS.
However, you need to switch your output to "verbose" and monitor the output window while it is attempting to deploy. This will give you a wealth of information during the deploy. Likely, your deploy is failing, this will help you figure ouy why.
As a side note, the free Genymotion is a much faster Android emulator that I have had great success with.

Dialog Box issues with Android Studio on OSX

Recently, whenever I have Android Studio in fullscreen mode, and a dialog box is presented, the dialog box disappears and I am unable to bring it back into focus so that I can start using the IDE again. I need to force quit the IDE and re-open and it is fine until the next dialog box is presented.
The issue seems to be from OSX 10.11 onwards, and has been reported by a number of users: https://code.google.com/p/android/issues/detail?id=192746
I experienced the same issues on Android Studio v1.5. To save the hassle, I updated to Android Studio 2.0+ on the beta channel, which did not resolve the issue.
I agree, it is very annoying. Hopefully a workaround or patch will come soon.

MonoDroid Fails to load emulator

I downloaded the trail version of MonoDroid. I am going through the hello world tutorial and now at the part where I want to deploy my app to the emulator.
It comes up with a "Select Device" dialog with nothing in it. So I click on "Start emulator image", this pops up another dialog with available images. I have one emulator made and it is in this dialog box. I hit ok and I am not at dialog box with still nothing to choose.
So I am not sure what to do.
I am running Visual Studios pro 2010 on a window 7 64bit.
This seems to be a regression in Google's latest version of the Android SDK. Emulators will no longer run if there are spaces in SDK location path.
Uninstall the Android SDK and install it back to a new location without spaces and it should work.

Resources