I think the new version of the Android SDK is not compatible with cordova emulation, so I change this:
return superspawn.spawn('android', ['list', 'avds'])
:
return superspawn.spawn('android', ['list', 'avd'])
inside
platforms/android/cordova/lib/emulator.js
and bug fixed. This is because the "avdes list avds" command has been changed to the "android avd list" inside the new SDK. Thanx to Douglas Neves
If after that you catch one more error:
Failed to install ... Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
You will need to change this:
var command = 'adb -s ' + target + ' install -r "' + apk + '"';
:
var command = 'adb uninstall "' + pkgName + '"; adb -s ' + target + ' install -r "' + apk + '"';
in the same file. This code will remove the application before installing it, so the version issue will disappear.
Dmitry
source share