Maroua
Maroua

Reputation: 1

how to run mobile app using ionic in real device

I want to run app with ionic view app in my real device I tried in the first time

ionic link

after

ionic upload 

when i run the last command i get this error

error

can anyone help me please ? and thanks in advance

Upvotes: 0

Views: 3583

Answers (2)

janadari ekanayaka
janadari ekanayaka

Reputation: 5156

  1. turn on the developer option on your mobile.
  2. Check your device is recognized - adb devices
  3. Go your ionic application folder and run npm i -g cordova
  4. ionic cordova run android --prod

Upvotes: 0

Sébastien
Sébastien

Reputation: 12139

You can run your Ionic project on a real device with the following command, for example for an Android device:

ionic cordova run android --device

Your Android device must be connected to your computer and you will have to allow debugging on your Android device.

ionic link is actually used to connect your local app to Ionic'online service.

To check that your device is recognized and Ionic will be able to transfer the apk, use the following command

adb devices

You should see your Android device listed.

Upvotes: 1

Related Questions