# Ionic capacitor run android --list cant find devices

**URL:** <https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592>\
**Category:** Ionic Framework\
**Created:** [June 3, 2021, 8:56pm UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592 "2021-06-03T20:56:12Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajboni](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@ajboni](https://forum.ionicframework.com/u/ajboni)\
**Post date:** [June 3, 2021, 8:56pm UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/1 "2021-06-03T20:56:12Z")

</div>

Hello, I’m trying to run ionic capacitor run but it doesn’t find any device. Nor the emulator or physical android phone.  
Running it from android studio works.

```auto
ionic capacitor run android --list
[INFO] No native targets found.

```

```auto
adb devices                                                                                               
List of devices attached
R9MN3010VFJ	device
emulator-5554	device

```

```auto
 avdmanager list 17:21:20
Available Android Virtual Devices:
    Name: Pixel_3a_API_30_x86
  Device: pixel_3a (Google)
    Path: /home/baj/.android/avd/Pixel_3a_API_30_x86.avd
  Target: Google APIs (Google Inc.)
          Based on: Android 11.0 (R) Tag/ABI: google_apis/x86
    Skin: pixel_3a
  Sdcard: 800 MB
Available devices definitions:
id: 0 or "tv_1080p"
    Name: Android TV (1080p)
    OEM : Google
    Tag : android-tv

```

Might be missing something on my system ? (Linux)  
Thanks

**Ionic version:** 6.16.1

**Ionic info:**

```auto
ionic info 314ms  17:31:15
[WARN] Error loading @capacitor/ios package.json: Error: Cannot find module '@capacitor/ios/package'
       
       Require stack:
       - /home/baj/.npm-packages/lib/node_modules/@ionic/cli/lib/project/index.js
       - /home/baj/.npm-packages/lib/node_modules/@ionic/cli/lib/index.js
       - /home/baj/.npm-packages/lib/node_modules/@ionic/cli/index.js
       - /home/baj/.npm-packages/lib/node_modules/@ionic/cli/bin/ionic

Ionic:

   Ionic CLI : 6.16.1 (/home/baj/.npm-packages/lib/node_modules/@ionic/cli)
   Ionic Framework : @ionic/react 5.6.8

Capacitor:

   Capacitor CLI : 3.0.0
   @capacitor/android : 3.0.0
   @capacitor/core : 3.0.0
   @capacitor/ios : not installed

Utility:

   cordova-res : not installed globally
   native-run : 1.3.0

System:

   NodeJS : v14.17.0 (/usr/bin/node)
   npm : 7.15.1
   OS : Linux 5.4

```

---

<div class="post-metadata">

**Author:** ![leonardofmed](https://avatars.discourse-cdn.com/v4/letter/l/ecccb3/32.png) [@leonardofmed](https://forum.ionicframework.com/u/leonardofmed)\
**Post date:** [June 7, 2021, 12:07pm UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/2 "2021-06-07T12:07:09Z")

</div>

I’m having the same problem. I can see my emulator with `adb devices`, but can’t with `ionic capacitor run android --list` or `npx native-run android --list`.

---

<div class="post-metadata">

**Author:** ![Gabriel-des](https://avatars.discourse-cdn.com/v4/letter/g/5f9b8f/32.png) [@Gabriel-des](https://forum.ionicframework.com/u/Gabriel-des)\
**Post date:** [June 7, 2021, 12:20pm UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/3 "2021-06-07T12:20:45Z")

</div>

I have same problem, and open two issues in github [Android list is not working · Issue #183 · ionic-team/native-run · GitHub](https://github.com/ionic-team/native-run/issues/183) and [bug: npx native-run android --list is not working · Issue #4673 · ionic-team/capacitor · GitHub](https://github.com/ionic-team/capacitor/issues/4673)

---

<div class="post-metadata">

**Author:** ![joao91carlosGit](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/joao91carlosgit/32/142478_2.png) [@joao91carlosGit](https://forum.ionicframework.com/u/joao91carlosGit)\
**Post date:** [June 7, 2021, 12:55pm UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/4 "2021-06-07T12:55:02Z")

</div>

I’m currently having the same problem when using capacitor run: `ionic capacitor run android --list`

---

<div class="post-metadata">

**Author:** ![jcesarmobile](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jcesarmobile/32/127095_2.png) [@jcesarmobile](https://forum.ionicframework.com/u/jcesarmobile)\
**Post date:** [June 8, 2021, 9:56am UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/5 "2021-06-08T09:56:25Z")

</div>

this was a bug in native-run, has been fixed in latest version (1.4.0)

since native-run is a dependency of @capacitor/cli, you can try to reinstall the CLI and it should pick the latest version, but make sure that was the case by checking the installed version in `package-lock.json`  
If not updated, you can force update the dependency with `npm update native-run --depth 6`

---

<div class="post-metadata">

**Author:** ![Bliss](https://avatars.discourse-cdn.com/v4/letter/b/f9ae1b/32.png) [@Bliss](https://forum.ionicframework.com/u/Bliss)\
**Post date:** [June 25, 2021, 10:17am UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/6 "2021-06-25T10:17:09Z")

</div>

Thank you for your response!

I have the same problem creating a new Ionic Capacitor project with:  
“@capacitor/cli”: “^3.0.2”,

Reinstalling and `npm update native-run --depth 6` both did not work for me.

`adb devices` shows a device.

Tbh. I have no good idea how to approach that problem 🙂  
Is there anything I can do to help solve it?

---

<div class="post-metadata">

**Author:** ![Bliss](https://avatars.discourse-cdn.com/v4/letter/b/f9ae1b/32.png) [@Bliss](https://forum.ionicframework.com/u/Bliss)\
**Post date:** [June 25, 2021, 11:22am UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/7 "2021-06-25T11:22:16Z")

</div>

It does work with `ionic cap open android`  
(I used android-studio-canary)

---

<div class="post-metadata">

**Author:** ![Gabriel-des](https://avatars.discourse-cdn.com/v4/letter/g/5f9b8f/32.png) [@Gabriel-des](https://forum.ionicframework.com/u/Gabriel-des)\
**Post date:** [June 25, 2021, 11:31am UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/8 "2021-06-25T11:31:26Z")

</div>

Have you tried to use `ionic cap run android`?

---

<div class="post-metadata">

**Author:** ![jcesarmobile](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jcesarmobile/32/127095_2.png) [@jcesarmobile](https://forum.ionicframework.com/u/jcesarmobile)\
**Post date:** [June 25, 2021, 3:04pm UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/9 "2021-06-25T15:04:07Z")

</div>

If you are using capacitor CLI 3.0.2, it should show native-run errors now, do you see something in the terminal?

---

<div class="post-metadata">

**Author:** ![JerominBilic](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@JerominBilic](https://forum.ionicframework.com/u/JerominBilic)\
**Post date:** [July 14, 2021, 10:38pm UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/10 "2021-07-14T22:38:21Z")

</div>

@jcesarmobile Was this issue solved? I encountered the same exact issue. I have capacitor/android - 3.1.1  
ionic 6.16.3, using visual studio on a Mac. I am able to use ionic cap open android, but not ionic cap run android.

I have both emulator and plugged in android showing on adb devices, but nothing comes up still on the terminal selection.

Also tried npm update native-run --depth 6 and it is version 1.4

---

<div class="post-metadata">

**Author:** ![jcesarmobile](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jcesarmobile/32/127095_2.png) [@jcesarmobile](https://forum.ionicframework.com/u/jcesarmobile)\
**Post date:** [July 15, 2021, 8:51am UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/11 "2021-07-15T08:51:34Z")

</div>

native-run wasn’t compatible with SDK 30, that’s what was fixed in version 1.4.0, also capacitor wasn’t showing native-run errors and that was fixed in 3.0.2.

So if you can’t run and are using those versions or newer you are hitting a different problem.

Try running npx cap run command directly instead of the ionic one and it should show the error, or ever use npx native-run command directly.

Then, if you share the errors maybe I can help you, and they usually link the native-run wiki with the common problems and how to fix them.

---

<div class="post-metadata">

**Author:** ![valentin-anamorphik](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/valentin-anamorphik/32/138585_2.png) [@valentin-anamorphik](https://forum.ionicframework.com/u/valentin-anamorphik)\
**Post date:** [August 3, 2021, 9:16am UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/12 "2021-08-03T09:16:40Z")

</div>

Hi, @jcesarmobile

**I’m having the same problem.**

```auto
$ ionic capacitor run android --list
[INFO] No native targets found.

```

_But :_

```auto
$ adb devices
List of devices attached
89 ******* device

```

```auto
$ ionic info
[WARN] Error loading @capacitor/ios package.json: Error: Cannot find module '@capacitor/ios/package'

       Require stack:
       - C:\Users\AppData\Roaming\npm\node_modules\@ionic\cli\lib\project\index.js
       - C:\Users\AppData\Roaming\npm\node_modules\@ionic\cli\lib\index.js
       - C:\Users\AppData\Roaming\npm\node_modules\@ionic\cli\index.js
       - C:\Users\AppData\Roaming\npm\node_modules\@ionic\cli\bin\ionic

Ionic:

   Ionic CLI : 6.16.2 (C:\Users\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework : @ionic/vue 5.6.12

Capacitor:

   Capacitor CLI : 3.1.2
   @capacitor/android : 3.1.2
   @capacitor/core : 3.1.2
   @capacitor/ios : not installed

Utility:

   cordova-res : 0.15.3
   native-run : 1.4.0

System:

   NodeJS : v14.17.0 (C:\Programs\nodejs\node.exe)
   npm : 7.20.2
   OS : Windows 10

```

Thanks! 😉

---

<div class="post-metadata">

**Author:** ![jcesarmobile](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jcesarmobile/32/127095_2.png) [@jcesarmobile](https://forum.ionicframework.com/u/jcesarmobile)\
**Post date:** [August 5, 2021, 5:08pm UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/13 "2021-08-05T17:08:12Z")

</div>

can you run `native-run android --list` and share the result?

---

<div class="post-metadata">

**Author:** ![valentin-anamorphik](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/valentin-anamorphik/32/138585_2.png) [@valentin-anamorphik](https://forum.ionicframework.com/u/valentin-anamorphik)\
**Post date:** [August 6, 2021, 6:21am UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/14 "2021-08-06T06:21:45Z")

</div>

> [@jcesarmobile](#):
>
> native-run android --list

```auto
$ native-run android --list
ERR_SDK_NOT_FOUND: No valid Android SDK root found.

```

---

<div class="post-metadata">

**Author:** ![jcesarmobile](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jcesarmobile/32/127095_2.png) [@jcesarmobile](https://forum.ionicframework.com/u/jcesarmobile)\
**Post date:** [August 6, 2021, 10:10am UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/15 "2021-08-06T10:10:02Z")

</div>

That means the Android SDK was not found.  
Did you install it?  
If you did, did you create a `ANDROID_SDK_ROOT` environment variable pointing to the SDK folder?

> **[Environment variables  |  Android Developers](https://developer.android.com/studio/command-line/variables)**
>
> Learn how to set environment variables for Android Studio and the command-line tools that specify things like where the SDK is installed and where user-specific data is stored.

---

<div class="post-metadata">

**Author:** ![valentin-anamorphik](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/valentin-anamorphik/32/138585_2.png) [@valentin-anamorphik](https://forum.ionicframework.com/u/valentin-anamorphik)\
**Post date:** [August 6, 2021, 10:42am UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/16 "2021-08-06T10:42:10Z")

</div>

Android SDK is installed.  
`ANDROID_SDK_ROOT` environment variable pointing to the SDK folder.

 ![2021-08-06_12h34_57](https://global.discourse-cdn.com/ionicframework/original/3X/9/d/9dd3a1ca9070277941d223673ecc4158f6a63a18.jpeg)

![2021-08-06_12h37_11](https://global.discourse-cdn.com/ionicframework/original/3X/1/0/10b959c7649962f6cf3d80aeb607b89fb5311be2.jpeg)

![image](https://global.discourse-cdn.com/ionicframework/original/3X/6/e/6e60f8e0a469f8bc586348930ceffba62301c668.png)

---

<div class="post-metadata">

**Author:** ![jcesarmobile](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jcesarmobile/32/127095_2.png) [@jcesarmobile](https://forum.ionicframework.com/u/jcesarmobile)\
**Post date:** [August 6, 2021, 10:47am UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/17 "2021-08-06T10:47:31Z")

</div>

Those are pointing to Android folder, should point to the SDK folder, which is inside Android folder, so you should append `\sdk` to them.

`ANDROID_HOME` is deprecated, you can remove it as you have `ANDROID_SDK_ROOT`

---

<div class="post-metadata">

**Author:** ![LouisR](https://avatars.discourse-cdn.com/v4/letter/l/9de053/32.png) [@LouisR](https://forum.ionicframework.com/u/LouisR)\
**Post date:** [November 16, 2021, 2:14pm UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/18 "2021-11-16T14:14:31Z")

</div>

Same issue here:

```
$ ionic capacitor run android -l --external
? Which device would you like to target? 
TypeError: Cannot read properties of undefined (reading 'value')

```

What’s the fix please?

```auto
Ionic:

   Ionic CLI : 6.18.1 (/home/louis/.nvm/versions/node/v16.13.0/lib/node_modules/@ionic/cli)
   Ionic Framework : @ionic/angular 5.8.5
   @angular-devkit/build-angular : 12.1.4
   @angular-devkit/schematics : 12.2.13
   @angular/cli : 12.1.4
   @ionic/angular-toolkit : 4.0.0

Capacitor:

   Capacitor CLI : 3.3.1
   @capacitor/android : 3.3.1
   @capacitor/core : 3.3.1
   @capacitor/ios : not installed

Utility:

   cordova-res : not installed globally
   native-run : 1.5.0

System:

   NodeJS : v16.13.0 (/home/louis/.nvm/versions/node/v16.13.0/bin/node)
   npm : 8.1.0
   OS : Linux 5.11

```

---

<div class="post-metadata">

**Author:** ![bilalyaqoob](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bilalyaqoob/32/140152_2.png) [@bilalyaqoob](https://forum.ionicframework.com/u/bilalyaqoob)\
**Post date:** [December 3, 2021, 1:46am UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/19 "2021-12-03T01:46:39Z")

</div>

Same issue  
i am unable to find my connected device.  
**adb devices** show my physical connected device  
but when i run  
**npx cap run android**  
It only shows me emulators not my device.  
when i run **npx native-run android --list**

```auto
Connected Devices:

  No connected devices found

Virtual Devices:

  Name API Target ID
  ----------------------------------------------
  Pixel 3 API 30 API 30 Pixel_3_API_30
  Pixel 4 XL API 30 API 30 Pixel_4_XL_API_30

```

---

<div class="post-metadata">

**Author:** ![allestaire](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@allestaire](https://forum.ionicframework.com/u/allestaire)\
**Post date:** [December 3, 2021, 7:36am UTC](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592/20 "2021-12-03T07:36:17Z")

</div>

Hi please be sure that the developer option and usb debugging on your device is enabled,  
Once enable, on the `Connected Devices:` there will be a list of `unauthorized` device, which is you need to allow it

[Next page](https://forum.ionicframework.com/t/ionic-capacitor-run-android-list-cant-find-devices/210592.md?page=2)
