> 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.
I try all your suggestions, all packages updated (ionic 5.2.3, native-run 0.2.8, cordova 9.0.0), platforms removed (also manually from config.xml), ionic repair, re-adding platform ionic cordova platform add android, generating resources ionic cordova resources and nothing…
Finally, I try downgrading Ionic to version 4.12.0 and it work it! Later I try to update to 5.0.0 and run again and the error appears again. It seems to be because of the version. Is it appening to someone else?
I’ve done probes in different PCs and I’m pretty sure that its’s caused by device permissions (even though I’ve configured the USB debugging and accept the permissions from device).
I’m using a VM, host is windows 10, client is Linux (Ubuntu 18.04.3 LTS) and I have the same problem.
But using a VM Windows 10 with the same app development environment and same host, it run. Device is a Samsung A5.
So I think that the problem is coming from usb…
Finally I’ve achived with the last Ionic version v5.2.7.
First, uninstalling Android Studio and whole sdk occurrences (at C:\Android, Users, AppData, Documents…).
Second, reinstalling Android Studio and setting the sdk directory at C:\Users<my-user>\Library\Android\sdk.
Next, I’ve add the system environment variables:
(It’s recommended to restart or at least to close and re-open command line console to catch new variables)
Then, run Android Studio and confirm the new sdk location if you didn’t set before. Enter in SDK Manager and install the Android versions fot your test devices.
Finally, return to your IDE and run ionic cordova run android