If you upgrade to Android Studio 3.5.3 and macOS Catalina, then you upgrade npm and Cordova too, you can see this error, when you try to run an Android emulator from terminal
Failed to execute shell command "getprop,dev.bootcomplete"" on device: Error: adb: Command failed with exit code 1 Error output:
error: device unauthorized.
The Android emulator starts, but I cannot find my app there.
Because Android Studio 3.5.3 changed a directory structure I add this to the system PATH variable:
Now I can use adb command in the terminal anywhere.
I tried all from this https://stackoverflow.com/questions/50935337/failed-to-execute-shell-command-getprop-dev-bootcomplete-on-device-error-for but it didn’t work. I must try running apk from Android Studio (chose apk on disk in Android Studio) and then Android Studio asks for permissions in the new macOS.
If you get something like this error log message after a run
SDK not found
Failed to find Android target '27'
Install missing platform and fix project
Click on the Install missing platform and fix the project link. Then I finally see my app in Android Emulator! But the error doesn’t disappear 😀
So, I try a new setup and new emulator, now not Nexus 5 on Android 7, but Pixel 2 on Android 10. Now I get this:
PANIC: Missing emulator engine program for 'x86' CPU.
And I go to sleep! 😀
Update – NEXT DAY
I used Google and find, that error can be from the update – Android Studio modified more own paths. Just for sure I remove Android Studio and install it like new. Then I try rewrite the PATH variable with this, where the username is my home directory name:
Command “cordova run –emulator” ends now with INSTALL SUCCESS, LAUNCH SUCCESS. Hallelujah!
Permanently PATH modification
This is a Mac. Catalina has a new shell ZSH. So, I must edit the variable PATH permanently. It is easy, if you know, how. Run the terminal and write:
This command takes you to the home directory.
This will open file .zshrc in editor nano. Here I add my PATH content after $PATH variable:
Press CTRL+O (save) and CTRL+X (exit). Done. Now terminal/SHELL knows, where Android tools for Cordova are, even if you restart your machine.