I'm trying to run an ionic app on my mobile phone (Android 4.4.2). USB-Debugging is activated.
When i run the command "ionic emulate android" everything works fine and the app is opend in the emulator.
But when I run the commad "ionic run android" I get following warning:
WARNING : No target specified, deploying to emulator
and the app is started on the virtual device...
Shouldn't the app run on my mobile phone? What am I doing wrong? How can I specify the target?
P.S.: When I copy the .apk file to the phone I can run the app.
Once you've enabled your device for debugging, make sure to turn on usb tethering on the device;
Settings > Tethering & Networks > USB tethering
This fixed the problem for me.
If your app is already installed in your device and your device debuging is already enabled.
Then uninstall the previous app and install the fresh apk
I solved the problem.
Here is what I did: I typed into the command line:
adb devices
(located in the "platform-tools" folder in the Android SDK) which returned me an empty list.So I installed my phone's drivers, which I downloaded from the vendors homepage.
Now the list contains my device and the app is started on my mobile phone.
I had a different problem, with a very simple solution.
When plugging in your Android device for the first time, it'll ask you to trust the computer's certificate. That popup screen disappeared on me, as I was just getting a call.
Simply unplugging/replugging your phone and accepting your computer's certificate should do the trick!
I had two problems (Ubuntu OS):
chrome//inspect
- close that (simply close the tab)Now run the command
cordova run android
and look at your device there another dialog will be appeared click ok, now you are done! In the terminal you will seeLAUNCH SUCCESS
. By the way I removed the old app from my device too.I'm on a Mac.
What worked for me was to heed the warning on the device that said no program on the Mac was available that could connect to the device, such as Android File Transfer.
I installed that. Unplugged and replugged the USB cable. And voila.