WARNING : No target specified, deploying to emulator

AndroidCordovaIonic

Android Problem Overview


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.

Android Solutions


Solution 1 - Android

I had another developer tool opened (Chrome Inspect) and it "ate" the connection. In my case, just closing the Chrome Inspect panel and running ionic run android worked.

Solution 2 - Android

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.

Solution 3 - Android

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!

Solution 4 - Android

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.

Solution 5 - Android

In my case I had Android 5.1.1, and below are the steps I took:

  • Please check that your PC recognizes your phone (you can access the files like in a USB flash drive). If not please install the drivers from google here.
  • Please check that the USB debugging options is checked on your phone, then: 1- Go to Setting -> General -> '{} Developer options' 2- Look for the 'USB debugging' option 3- If the 'USB debugging' option is disabled then turn off 'Developer options' and turn it back on. Now you should be able to check the 'USB debugging' option.

enter image description here

Solution 6 - Android

None of these worked for me on android 6.0 on a mac.

I found this article: http://trendblog.net/android-file-transfer-not-working/

quoting from it:

  • Enable Developer Mode by going to Settings > About Phone (at the very bottom usually) > press on Build Number repeatedly until the pop-up appears
  • Go to Settings > Developer Options
  • Enable USB debugging

Solution 7 - Android

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.

Solution 8 - Android

I had two problems (Ubuntu OS):

  1. I had a connection open with chrome//inspect - close that (simply close the tab)
  2. I missed the dialog that appears when you connect your device through USB cable. You must trust the computer.

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 see LAUNCH SUCCESS. By the way I removed the old app from my device too.

Solution 9 - Android

No target specified and no devices found, deploying to emulator When this message appears, you have to click START, and activate your emulator before.

enter image description here

Solution 10 - Android

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

sudo ionic cordova run android

Solution 11 - Android

Once you are remove the USB plugin from the computer means it will not work. Already open the Chrome inspect in your PC means close that tab and run. In my case, just closing the Chrome Inspect panel and running ionic cordova run android worked.

Thats all. Enjoy your coding

Solution 12 - Android

I got the solution by removing the Android emulator and re-create the emulator from AVD Manager of Android Studio.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionKlaus ErtlView Question on Stackoverflow
Solution 1 - AndroidtomasbedrichView Answer on Stackoverflow
Solution 2 - AndroidKlaus ErtlView Answer on Stackoverflow
Solution 3 - AndroidMichielView Answer on Stackoverflow
Solution 4 - AndroidhugoView Answer on Stackoverflow
Solution 5 - AndroidartemisianView Answer on Stackoverflow
Solution 6 - AndroidShane LovelandView Answer on Stackoverflow
Solution 7 - AndroidarieljakeView Answer on Stackoverflow
Solution 8 - AndroidTasnim RezaView Answer on Stackoverflow
Solution 9 - AndroidJunior PlacidoView Answer on Stackoverflow
Solution 10 - AndroidRaza JaffarView Answer on Stackoverflow
Solution 11 - AndroidmahendrenView Answer on Stackoverflow
Solution 12 - AndroidNawendu KumarView Answer on Stackoverflow