Test Ionic App to Actual Device or Emulator

Hello, I am a newbie with ionic app development and I build an ionic application and it works well on the browser everytime I run a test. Now, I am trying to run my ionic application to an actual device or an emulator using the command ‘ionic cordova run android’ but I always get this error

Ionic CLI version: PRO 4.2.1
Cordova version: 8.0.0
NPM version: 6.4.1
Node.js version: 8.11.3
Visual Studio Code version: 1.30.2
Android Studio version: 3.3
Java version: 1.8.0_191

I have also tried the following tutorials but I always get the same problem.


I hope someone can help me with this. Thank you in advance.

Maybe plugin dependency problem.
Remove this cordova-plugin-firebase plugin, then use this command on CLI:

  1. ionic cordova plugin rm cordova-plugin-firebase
  2. cordova clean
  3. ionic cordova prepare android
  4. ionic cordova run android

I hope solve your problem.

1 Like

Your solution works like a charm. Thank you so much for your help. I just encountered an error during cordova clean but I fix that with this solution (https://stackoverflow.com/questions/42754758/failure-build-failed-with-an-exception-ionic). Thank you very much :heart::smiley::blush:

1 Like