Error "ionic cordova run android " after native-run and IONIC 5 update

Hi guys,

After having updated native-run, the command ionic cordova run android --device has stopped working.

I have everything updated, Android Studio SDK and yours corresponding packages.

Ionic info:

Ionic:

   Ionic CLI                     : 5.0.1 (C:\Users\nuria\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.3.1
   @angular-devkit/build-angular : 0.13.8
   @angular-devkit/schematics    : 7.3.8
   @angular/cli                  : 7.3.8
   @ionic/angular-toolkit        : 1.5.1

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.1, (and 7 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 0.2.4

System:

   NodeJS : v10.15.3 (C:\Program Files\nodejs\node.exe)
   npm    : 6.4.1
   OS     : Windows 10

The error is:

> native-run.cmd android --app platforms\android\app\build\outputs\apk\debug\app-debug.apk --device
Error: Command failed: C:\Users\nuria\AppData\Local\Android\Sdk\platform-tools/adb -s RF8M204LVHX shell getprop

    at ChildProcess.exithandler (child_process.js:294:12)
    at ChildProcess.emit (events.js:189:13)
    at maybeClose (internal/child_process.js:970:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
[ERROR] An error occurred while running subprocess native-run.

        native-run.cmd android --app platforms\android\app\build\outputs\apk\debug\app-d... exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

Any ideas?

3 Likes

Same issue here, I’ve been stuck on it since the 5th of June

1 Like

It’s fixed now. Update your ionic-cli with npm i -g native-run@latest

You need update IONIC CLI (v 5) and platforms-tool of android in v 28

I’ve got android sdk v28 installed but every time I run ionic info it only shows 26.1.1. How do i get it to to upgrade?

Remove platform from your project and reinstall with ionic cordova prepare android