Cannot run or emulate android app

I’m new on Ionic and I’m having trouble with running or emulating an basic app through ionic cordova run android or ionic cordova emulate android.
Creating a new app and adding android platform works fine, as well as previewing it on my browser. But when I connect my Samsung (in developer mode) and run ionic cordova run android, it doesn’t detect it and doesn’t succeed either to load the emulator.

No target specified and no devices found, deploying to emulator
Error: No emulator images (avds) found.
1. Download desired System Image by running: /home/herve/Android/Sdk/tools/android sdk
2. Create an AVD by running: /home/herve/Android/Sdk/tools/android avd
HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver

However, when I run android avd list, I get the avd I installed through Android Studio :

Available Android Virtual Devices:
   Name: Nexus_5X_API_26
 Device: Nexus 5X (Google)
   Path: /home/herve/.android/avd/Nexus_5X_API_26.avd
 Target: Google Play (Google Inc.)
         Based on: Android 8.0 (Oreo) Tag/ABI: google_apis_playstore/x86
   Skin: nexus_5x
 Sdcard: 100M

Here is my ionic info

cli packages: (/usr/lib/node_modules)

    @ionic/cli-utils  : 1.18.0
    ionic (Ionic CLI) : 3.18.0

global packages:

    cordova (Cordova CLI) : 7.1.0 

local packages:

    @ionic/app-scripts : 3.1.2
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v8.9.0
    npm               : 5.5.1 
    OS                : Linux 4.10

Environment Variables:

    ANDROID_HOME : /home/herve/Android/Sdk

Misc:

    backend : pro

Does anyone has any idea why I can’t run or emulate ionic apps ? Any help will be appreciated !

whats the result of adb devices?

I get List of devices attached : followed by nothing

device is connected and in dev mode with usb debugging activated?

My bad I thought dev mode would activate usb debugging. With USB Debugging it works ! Thanks ! However I still can’t emulate with ionic cordova emulate android. Any suggestion ?

1 Like

Whenever you connect your device to system,
It asks for RSA fingerprint Allow it. in the device.

Later for testing inspect a tab in chrome and check is your device listed in remote devices.
If you are able to see your device in the chrome Then run with android .
You will be able to run on device.