This is a cordova-android bug because Google probably changed the error message when trying to run the app.
It has been fixed already and released in cordova-android 7.1.1 or newer. If you can't update to those versions do:
I think it would work if you apply this change yourself to yourAppName/platforms/android/cordova/lib/emulator.js
Change
if ((error && error.message &&
(error.message.indexOf('not found') > -1)) ||
(error.message.indexOf('device offline') > -1))
to
if ((error && error.message &&
(error.message.indexOf('not found') > -1)) ||
(error.message.indexOf('device offline') > -1) ||
(error.message.indexOf('device still connecting') > -1))
Another workaround is to start emulator from Android studio and then run cordova command to run app. This way cordova finds the emulator already running and it avoids the race condition. Thanks!
This was a solution for me in Ionic 3 version:
Try to run emulator again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With