"No devices available" in Visual Studio 2015

10,752

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.

enter image description here

As a final step, try closing and then restarting the Visual Studio instance keeping emulated Android instance up and running.

Solution 2

Try this:

  1. set appriopriate solution platform (eq ARM)
  2. run Android VDM: from list "No device available" select "Android Virtual Device Manager"
    • select appriopriate device (ARM). Click Start
    • Click Start and Launch.
  3. Attach to emulator process [Ctrl+Alt+P] enter image description here
    • select emulator-arm.exe
      (select and attach program from list)
    • and click Attach
  4. You can see new Toolbar Debug Location with Process
    enter image description here
Share:
10,752

Related videos on Youtube

konstantin_doncov
Author by

konstantin_doncov

ML engineer and software developer

Updated on June 22, 2022

Comments

  • konstantin_doncov
    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":enter image description here

    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.

    My AVD manager looks like: enter image description here

    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
    konstantin_doncov over 8 years
    Thanks! I already tried the force uninstallation of Visual Studio. Please check my updated question.
  • MNS
    MNS over 8 years
    Okay. 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
    konstantin_doncov over 8 years
    I don't have any devices in this list.
  • MNS
    MNS over 8 years
    That 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
    konstantin_doncov over 8 years
    Ok, 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 got 5554: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
    MNS over 8 years
    Try 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
    konstantin_doncov over 8 years
    Ok, 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.