forked from github/cordova-android
CB-8582 Obscure INSTALL_FAILED_VERSION_DOWNGRADE error when installing app
This commit is contained in:
parent
dd3b9dd01c
commit
d9814c5542
3
bin/templates/cordova/lib/Adb.js
vendored
3
bin/templates/cordova/lib/Adb.js
vendored
@ -67,6 +67,9 @@ Adb.install = function (target, packagePath, opts) {
|
||||
if (output.match(/INSTALL_PARSE_FAILED_NO_CERTIFICATES/)) {
|
||||
output += '\n\n' + 'Sign the build using \'-- --keystore\' or \'--buildConfig\'' +
|
||||
' or sign and deploy the unsigned apk manually using Android tools.';
|
||||
} else if (output.match(/INSTALL_FAILED_VERSION_DOWNGRADE/)) {
|
||||
output += '\n\n' + 'You\'re trying to install apk with a lower versionCode that is already installed.' +
|
||||
'\nEither uninstall an app or increment the versionCode.';
|
||||
}
|
||||
|
||||
return Q.reject(new CordovaError('Failed to install apk to device: ' + output));
|
||||
|
5
bin/templates/cordova/lib/emulator.js
vendored
5
bin/templates/cordova/lib/emulator.js
vendored
@ -372,8 +372,11 @@ module.exports.install = function(givenTarget, buildResults) {
|
||||
if (stdout.match(/INSTALL_PARSE_FAILED_NO_CERTIFICATES/)) {
|
||||
stdout += 'Sign the build using \'-- --keystore\' or \'--buildConfig\'' +
|
||||
' or sign and deploy the unsigned apk manually using Android tools.';
|
||||
} else if (stdout.match(/INSTALL_FAILED_VERSION_DOWNGRADE/)) {
|
||||
stdout += 'You\'re trying to install apk with a lower versionCode that is already installed.' +
|
||||
'\nEither uninstall an app or increment the versionCode.';
|
||||
}
|
||||
|
||||
|
||||
reject(new CordovaError('Failed to install apk to emulator: ' + stdout));
|
||||
} else resolve(stdout);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user