"No devices available" in Visual Studio 2015
Solution 1
Try following options to get any of the devices listed in Visual Studio.
1. Ensure AVD Instance is Running
Since Visual Studio lists only running instances of Android devices as connectible devices, one need to ensure that any of the Android emulator instance is running. For that, select any AVD from the AVD manager and then push "Start" button. A "Launch Options" dialogue will be displayed. Now push "Launch" button. You can see Android instance running.
2. Ensure AVD instance is Detectable to ADB
Try the command adb devices -l
and see that at least one device is listed there.
If an emulator device exists then try connecting to it using the command connect 127.0.0.1:5554
where 127.0.0.1 is the IP address of android instance and 5554 is the (default) port number.
3. Ensure Correct Configuration is Selected
It seems that you will have to select the "ARM" configuration with respect to the CPU architecture shown in your AVD Manager.
In your screenshot, "x86" is the selected configuration and "No devices available" is shown. This is because the AVD manager doesn't have any x86 AVD created in it.
When you select "ARM" configuration (and one of the AVD is up and running) then you should be able to see some devices such as shown below.
As a final step, try closing and then restarting the Visual Studio instance keeping emulated Android instance up and running.
Solution 2
Try this:
- set appriopriate solution platform (eq ARM)
- run Android VDM:
- select appriopriate device (ARM).
- Click Start and Launch.
- Attach to emulator process [Ctrl+Alt+P]
- select emulator-arm.exe
- and click Attach
- select emulator-arm.exe
- You can see new Toolbar Debug Location with Process
Related videos on Youtube
Comments
-
konstantin_doncov almost 2 years
I trying to deploy Native activity application(Android, C++) on the Visual Studio 2015 embedded emulator. But have a problem: start debugging button has label "no devices available":
But my AVD manager has some devices.
Deploy output:
Deploy started: Project: Android3.Packaging, Configuration: Debug x86 ------
Error installing the package. The package 'C:\Users\User\Documents\Visual Studio 2015\Projects\Project\Android3\x86\Debug\Android3.apk' does not exist on disk.
Invalid package information.
I already had the same problem and tried to reinstall Visual Studio several times but it's gives nothing. Besides this in the last time I had to clean the registry manually due to Visual Studio 2015 installer said that I already had android-sdk on the my computer but this was not so.
How can I fix it? How can I completely uninstall Visual Studio and install it right?
OS: Windows 7
UPD:
If I set "Android3.NativeActivity" as startup project, then I get error window:
Unable to start debugging. Check your debugger settings by opening project properties and navigation to 'Configuration properties --> Debugging'
If I set "Android3.Packaging" as startup project, then I get:
Error installing the package. The device '' is invalid or not running. Please switch to another device, or use the Android Virtual Device (AVD) Manager to start a compatible emulator, or connect a compatible Android device.
The device is invalid or is not running.
in the deploy output.
AVD manager has emulators for API level 19.
Android3.NativeActivity->Properties->General->Target API Level = KitKat 4.4 - 4.4.4, (android-19)
Android3.Packaging->Properties->General->Target API Level = KitKat 4.4 - 4.4.4, (android-19)
So everything set as API level 19.
What else could be wrong?
-
konstantin_doncov over 8 yearsThanks! I already tried the force uninstallation of Visual Studio. Please check my updated question.
-
MNS over 8 yearsOkay. To ensure that the AVD instance is detectable to ADB try the command "adb devices -l" and see that a device is listed there. If an emulator device exists then try connecting to it using the command "adb connect 127.0.0.1".
-
konstantin_doncov over 8 yearsI don't have any devices in this list.
-
MNS over 8 yearsThat means no instance of AVD device is running. Select any AVD from the AVD manager and then push the "Start" button. A "Launch Options" dialog will be displayed. Push the "Lanuch" button. You can see Android instance running. Wait for sometime and try the above command again.
-
konstantin_doncov over 8 yearsOk, I launched my AVD. While it loaded I executed command
adb devices -l
, output returned this:emulator-5554 offline
. Then I executed"C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" connect 127.0.0.1
and got:connected to 127.0.0.1:5555
, but window with AVD got5554:AVD....
title, so I executed this:"C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" connect 127.0.0.1:5554
with output:connected to 127.0.0.1:5554
. What should I do next? -
MNS over 8 yearsTry changing the configuration from "x86" to "ARM" back and forth in Visual Studio and see any device is shown. If no device is shown then close Visual Studio instance and then restart.
-
konstantin_doncov over 8 yearsOk, I successfully launched AVD! Thanks! Now you can update your answer(because principal parts is located in the comments) and I will approve your answer. Thanks again.