Reputation: 1393
I have 2 devices detected in adb. One from my genymotion, and the other from my real device :
$ adb devices
List of devices attached
192.168.57.101:5555 device
e78ab88d device
I want to run my ionic app on e78ab88d device
. How can i achieve this?
If i run ionic run android
, its automatically run on my genymotion device. It says, no target specified.
img no target specified
What command to run on specific device?
Upvotes: 37
Views: 47199
Reputation: 1
to also run the app live do. $ionic cordova run android -l
make sure that the phone is connected with laptop through cable.
Upvotes: 0
Reputation: 1530
Using --target=e78ab88d
failed for me. But it seemed to work when I used --device=e78ab88d
.
Basically I have 2 Android phones connected and I wanted to target a specific device. without the --target
or --device
, it deployed randomly to the devices.
ionic cordova run android --device=e78ab88d
worked for me. Just in case someone is experiencing the same problem as me.
Upvotes: 0
Reputation: 3652
run with target device id, something like :
ionic run android --target=e78ab88d
EDIT
With new Ionic 3 CLI use :
ionic cordova run android --target=e78ab88d
For list of all available devices, use :
ionic cordova run android --list
Upvotes: 89