how to add windows phone emulator to the uwp project - windows

Now I'm updating someone's UWP project.
I use Visual Studio 2017 on windows 10 64bit.
Building is successful.
But When I run this project, I got an error.
DEP6200: Bootstrapping failed.Device cannot be found.
SmartDeviceException - Deployment failed because no device was
detected.
I think, the reason is that I didn't use real windows phone.
So that I wanted to use windows phone emulator.
But I don't know how to add emulator to running option.
When I created new UWP project, I could find emulators which are connect to that project.
Anyone solved this issue?

You have to install Emulators.
Please take a look at this page and download them Windows Emulator archive .
Simply choose your emulator version that you want to debug your app and then Click INSTALL EMULATOR , After installation Restart Visual Studio .

To use emulator there are some prerequest, you can check it from here.
That's to say, first ,you need to make sure you followed the system requirements.
Then you have to install emulator like MKH said. And at last, set the CPU to ARM and choose the emulator you need, run the project and you will see the result.

Related

Run flutter from vs code to physical phone without Android studio or emulator on windows

I started to Learn flutter toolkit need to run the app on physical phone no need to install emulator or Android studio just I install:
A)Flutter sdk and add to windows path.
B)install vs code to use as editor , just add flutter plugin to it
C) connect my physical Android phone and already work in developer mode.
The problem when I run command
Give me that my phone not connect and when run app using F5 in vs code ask for emulator I don't need that I need physical phone only.
That is flutter doctor I have any body can help me what I need to add to my PC no need Android studio no need to add any emulator.
$ flutter doctor
[√Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft
Windows [Version 10.0.17763.1158], locale ar-SA)
[XAndroid toolchain - develop for Android devices
X Unable to locate Android SDK.
Install Android Studio from:
https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android
SDK components.
(or visit https://flutter.dev/setup/#android-setup for
detailed instructions).
If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
[!Android Studio (not installed)
[√ VS Code (version 1.44.2)
[!Connected device
No devices available
Doctor found issues in 3 categories.
You must need android sdk to run flutter app on your android and xcode for running on iphone. Download android sdk and check again.

How to run UWP app on Simulator and simulate a location?

I need to test my UWP application using a simulated location.
I assume that I can do this by running the app on the simulator instead of the local machine, but there is a problem. When I select Simulator, the simulator opens but never finished initializing. It is stuck in a state with a series of dots running across the screen.
In the Visual Studio window, the last message I see is "Registering the application to run from layout". I don't know what that means.
I found some old posts that suggest I need to acquire or renew a license. I checked to make sure that Developer Mode was enabled on my machine and I also ran "Get-WindowsDeveloperLicense" from an elevated PowerShell account, but it did not fix the problem.
Thanks,
Frank
How do I start a UWP simulator?
Your system need to support Hardware-assisted virtualization and
Enable Hyper-v for emulator
Then switch the Solution Platforms to X86 or x64.
For more info please refer Run Windows Store apps in the simulator
simulate a location?
The Visual Studio 2015 simulator does not include the geolocation button. This is because the Windows 10 simulator does not include geolocation simulation. If you need to do this kind of simulation, you can use the Visual Studio 2013 simulator on Windows 8.1 or earlier operating systems.

could not launch the emualator please file an issue an attempt was made to load an application with an incorect format

I get this error when trying to launch xamarin emulator from visual studio 2017 device manager. I have downloaded image file tried resetting but nothing seems to work.
I have encounted similar problems, and my solutin are:
1)check the Complile Android version,Minimum Android version,Target Android version and the OS for your divice(You can get this by opening ADM and editing the device). Please sure you have intalled the SDK for the compiling version, target version and the device OS by Android ADK Manager.
2) If you have correctly installed the needed ADK and still get the problem, you can install the app on your phone and run the project again.

react-native and Visual Studio Emulator for Android

is it possible to run react native app on Visual Studio Emulator for Android (standalone) and if yes what are the steps to set it up? I can successfully start emulator, that part works but cant figure out how to config react-native to use it instead of "adb devices".
My current attempts end with error:
Could not debug. Error while executing command 'adb devices': Command failed: adb devices
'adb' is not recognized as an internal or external command,
operable program or batch file.
I know about Android Studio and virtual devices that come with it but I would like to try that as the last option. My environment is: Windows 10 pro, VS Code (with React Native Tools Extension), react-native, yarn.
UPDATE
even though I did not get anywhere in my attempts to make it work
I just would like to share what knowledge I gained while struggling with this issue
because it is possible that my issues are specific to my environment but it might work on another PC.
Theoretically it requires very few steps to run react-native in Visual Studio Emulator for Android
in VS code without installing Android Studio or Visual Studio.
Install Visual Studio Emulator for Android, standalone
https://www.visualstudio.com/vs/msft-android-emulator/
download Android Debug Bridge (adb)
it is included with Android SDK Platform-Tools, download and read more here:
https://developer.android.com/studio/command-line/adb.html
it downloads as zip file, you unzip it and then add a path to adb.exe in PATH environment variable,
so you can execute adb command from any path. I am using yarn and it needs that to know where adb.exe is.
It is kind of a connector between your app and virtual or real android device
it has to be running before you start emulator and basic command are:
to stop - adb kill-server
to start - adb start-server
to see list of devices that adb recognized - adb devices
I also found a specific instruction on how to make Visual Studio Emulator for Android work with adb:
https://msdn.microsoft.com/en-us/library/mt228282.aspx
'Visual Studio Emulator for Android' devices are not listed in the Android Device Monitor
it is a registry edit for key
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools
apparently Visual Studio Emulator for Android is using that and you can create it if it is not there
and just add/modify Path variable to be a path to adb.exe.
now you can start Visual Studio Emulator for Android and after that open integrated terminal in you react native VS code project
and type:
yarn run android
and if I get it right (and in the perfect world) your app should get installed and shown in Visual Studio Emulator for Android,
well, not for me, my emulator never shows up as a device when I type adb devices, all I see is a blank two lines.
So I think I spent enough time on this trying to make it work and in my case the answer to my own questions is:
theoretically you should be able to run Visual Studio Emulator for Android with react-native from VS code but in reality
it probably will not work, so seek something more reliable.
I did see a little light at the end of the tunnel when I tried connecting my phone with USB using expo app, adb picked it up right away,
"yarn run android" started doing something and expo even tried to load my app, I held my breath, my heart was racing, I was ready for a miracle... and .... boom... it just crashed, but this could be easier
for me to resolve though, it appears some networking config issues, my phone does not recognize IP address which was in the output after running yarn
and if this works,(big IF) then it is still good, I can run/debug react-native without using Android/Visual Studio.
Final update:
could not make it work, stopped all attempts and went for Android Studio instead, Android Studio emulators work with react native and expo without any issues. (well, not yet, sample app runs OK at least.)
The same symptoms occurred to me when trying to set both React-Native and VS Emulator for Android together, and the following steps solved them:
On the VS Emulator for Android, I checked my emulated phone's IP at the Tools/Network tab. Emulator Adapter #1 refers to the emulated phone.
Then, I headed to the terminal and ran adb connect <ip_address>:5555. That made the emulated phone available to Android Studio as well as to React-Native.
if you already install android studio
then add C:\Users\manu\AppData\Local\Android\Sdk\platform-tools path into environment path (replace your username instead of manu)
if you have not android studio then
need download adb from https://github.com/intel/haxm/releases/download/v7.0.0/haxm-windows_v7_0_0.zip
then install
intelhaxm-android.exe
.
open a new terminal and now adb commnad will work
it is haxm source website https://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager-intel-haxm

DEP3316 Error - Cannot deploy to Win10 Phone from Visual Studio 2015

I am unable to deploy an application via Visual Studio 2015 Update 2 to my Lumia 650. In the past it was possible but now I get the following error indicating to change the build configuration of a project or add an ARM device.
The build config is set to 'ARM', the device is connected via USB and my configuration manager looks like this.
The platform targets seem correct, so the config setting 'ARM' points to the platform target 'ARM'. I can run the app on my local computer, but I cannot deploy it to my phone. I also can't run the app in an emulator because if I choose the setting, VS does not change the caption and accept it. I don't have any more ideas.
If it helps I could provide my .sln file with all build configurations if desired. The only thing I did was checking out my source code to a new location on my hard drive. Since then I couldn't deploy anymore. Someone got any hints?
UPDATE:
I cannot deploy to my phone, run the app in an emulator or run the app in the simulator. The only thing that works is running on the local machine. Even all new apps I create cannot be deployed or run in an emulator or simulator. Visual Studio and SDK repair installation was made, no notable change.
If I load an old Windows Phone 8.1 RT or Silverlight project everything works normally, I can use the emulator and I can deploy it to the phone.
Right click your app in VS -> Properties -> Debugging
There is a combo box to select the target device. In my case there was no selection and I chose 'Device'. Now it works again.
https://dotblogs.com.tw/billchung/2016/04/03/051455

Resources