Ionic Cordova run android Error

Asked

Viewed 562 times

1

I’m having the following error while running "Ionic cordovan run android command"

Error: Failed to execute shell command "getprop,dev.bootcomplete"" on device:
Error: adb: Command failed with Exit code 1
Error output: error: device unauthorized. This adb server’s $ADB_VENDOR_KEYS is not set Try 'adb Kill-server' if that seems Wrong. Otherwise check for a confirmation dialog on your device.

The environment variables are already defined, grandle installed and etc... I have no idea what is happening, I already searched in Stackoverflow and nothing, the Android emulator opens, but the app does not run, I’m using Ubuntu 17.04. If anyone can help me I’d appreciate/

1 answer

0


You can try using: adb start-server and then adb Devices (to list the Vices)

if no device is displayed you need to check your adb and also the device drives that you are connecting to the USB

If the list appeared without any device, probably your pc/mac did not recognize the driver for the device,. try to install the correct driver for the device, before that ensure that the device’s Developer Mode is enabled, (on the device go to) General settings/ Developer options/ USB Debugging (enable this option), if after that your adb still does not recognize, you need to locate an ideal driver for your pc to recognize the device, usually the google-usb driver that comes within the Android SDK already recognizes most.. but there are some Vices that are not recognized

For example the LG-K10 (had to install the driver directly from the LG website)

Download USB Drivers - Google

  • But is this driver even necessary to emulate on the desktop? My mobile phone is a Samsung GT-l8262B, the Developer mode is activated (although I have not tried to run it on mobile device). If it is necessary anyway, to emulate where I could find the driver and recognize it? Will I need to connect the phone to the USB? Sorry, I’m a little lost...

  • @Matheusferreira, in the case of the emulator the driver is not necessary, USB driver is only for USB connections, adb should recognize the emulator, which emulator you are using?

  • @Matheusferreira in my tests used Genymotion as emulator, never had problems running the apps;

  • 1

    I’m using android studio

  • 1

    I finally got it fixed! Just open the emulator before running the command

  • By the way you couldn’t even connect the device right, had to be via emulator, a tip.. it’s always good to run the app on the device before launching or testing before going to the store, don’t just trust the emulator, you may have errors that only happen in tests on real devices! It is worth trying to let your ADB recognizing android phones and tablets, try to see about USB drivers later and do some more tests. I only debug on real devices, in the latter case I use an emulator!

  • 1

    In the device I got but was stuck at the beginning of the app, but I think it is because the device is too old, then I will try in others when I can... But my goal was to make it run on the same emulator.

  • 1

    I tested it on my girlfriend’s cell phone and it worked... Mine was very old kk I can barely use it from so slow it’s

  • @Matheusferreira then it’s all right, good luck!

Show 4 more comments

Browser other questions tagged

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