question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'cordova run android' does not deploy the app to emulator

See original GitHub issue

Bug Report

Problem

‘cordova run android’ doesn’t deploy the app to the emulator. It just gets to a point that it loops over and over

What is expected to happen?

It should deploy and launch the app on the emulator

What does actually happen?

The output below is what I get using the --verbose option.

Information

`Checking Java JDK and Android SDK versions

ANDROID_SDK_ROOT=C:\Users\xxx\AppData\Local\Android\Sdk (recommended setting)
ANDROID_HOME=C:\Users\xxx\AppData\Local\Android\Sdk (DEPRECATED)
Running command: adb devices
Command finished with error code 0: adb devices
No target specified and no devices found, deploying to emulator
Running command: adb devices
Command finished with error code 0: adb devices
Running command: adb devices
Command finished with error code 0: adb devices
Running adb shell command “cat /proc/cpuinfo” on target emulator-5554…
Running command: adb -s emulator-5554 shell cat /proc/cpuinfo
Command finished with error code 0: adb -s,emulator-5554,shell,cat,/proc/cpuinfo
Running adb shell command “ps” on target emulator-5554…
Running command: adb -s emulator-5554 shell ps
Command finished with error code 0: adb -s,emulator-5554,shell,ps
.Running adb shell command “ps” on target emulator-5554…
Running command: adb -s emulator-5554 shell ps
Command finished with error code 0: adb -s,emulator-5554,shell,ps
.Running adb shell command “ps” on target emulator-5554…
Running command: adb -s emulator-5554 shell ps
Command finished with error code 0: adb -s,emulator-5554,shell,ps
.Running adb shell command “ps” on target emulator-5554…
Running command: adb -s emulator-5554 shell ps
Command finished with error code 0: adb -s,emulator-5554,shell,ps
.Running adb shell command “ps” on target emulator-5554…
Running command: adb -s emulator-5554 shell ps
Command finished with error code 0: adb -s,emulator-5554,shell,ps`

As you can see, it is just looping and not doing anything.
The same project runs just fine on another machine. It works like it should when I import the platforms/android folder to Android Studio and run the project. Tried ‘adb logcat’, doesn’t show anything.

Command or Code

cordova run android --verbose

Environment, Platform, Device

OS: win32 Node: v10.14.2 npm: 6.5.0 Java JDK: installed 1.8.0 Android SDK: installed true Android target: installed android-29,android-28,android-27,android-26 Gradle: installed C:\Gradle\bin\gradle Cordova; 9.0.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
breautekcommented, Oct 11, 2019

Apologies for bailing, it was getting late for me last night. Glad you found your solution though!

1reaction
diaconubogdancommented, Oct 10, 2019

Wow, that was fast. cordova platform list: `Installed platforms:

android 8.1.0
Available platforms:

browser ^6.0.0
electron ^1.0.0
ios ^5.0.0
osx ^5.0.0
windows ^7.0.0` Running on cordova-android@8.1.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cordova don't deploy to my android emulator - Stack Overflow
1 Answer 1 ... To run a Cordova build application on an Android emulator you need to use an additional command line switch....
Read more >
Android Platform Guide - Apache Cordova
Deploy to Emulator ... If instead you are working within Eclipse, right-click the project and choose Run As → Android Application. You may...
Read more >
ionic cordova run: native-run Android and iOS Apps in Browsers
Build your app and deploy it to devices and emulators using ionic cordova run. Use the native-run utility to run your app in...
Read more >
Android emulator does not start on Windows operating system
Open a Window Explorer and navigate to the folder where your Android SDK resides · Run the Android AVD.exe program. · In the...
Read more >
Cordova - Google Android Emulator and SDK problem
At first i couldnt find any emulator option, but then i found some info about folders in user app (rename folder phonetools to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found