Error running Ionic Cordova run android --device command

Asked

Viewed 805 times

1

When I run Ionic Cordova run android --device in my project it appears the following message.

[ERROR] An error occurred while running subprocess native-run.

My Ionic.info:

Ionic:

   Ionic CLI         : 5.0.1 (C:\Users\DEV02\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework   : ionic1 1.1.0
   @ionic/v1-toolkit : 1.0.14

Cordova:

   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : android 8.0.0
   Cordova Plugins   : no whitelisted plugins (0 plugins total)

Utility:

   cordova-res : not installed
   native-run  : 0.2.4

System:

   NodeJS : v10.16.0 (C:\Program Files\nodejs\node.exe)
   npm    : 6.9.0
   OS     : Windows 10
  • 1

    Run the command with "--no-Native-run" at the end.

1 answer

0


Delete the entire folder node_modules within your project and then run the following command:

npm install @ionic/app-scripts@latest --save-dev

It will work again.

  • I deleted the node_modules folder, and removed and added platform, but it still didn’t work.

  • You stopped the service before the procedure?

  • Yes, I stopped everything, and I gave the command, I would have to do something else ?

  • For everything, delete the folder, restart the machine and run the command, This command has to solve the problem.

  • I did the whole procedure, but it still displays an error message:

  • Error: Command failed: C:\Users\DEV02\AppData\Local\Android\Sdk\platform-tools/adb -s 0054735553 shell getprop

 at ChildProcess.exithandler (child_process.js:294:12)
 at ChildProcess.emit (events.js:198:13)
 at maybeClose (internal/child_process.js:982:16) at Process.ChildProcess. _Handle.onexit (Internal/child_process.js:259:5) [ERROR] An error occurred while running subprocess Native-run.

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.