You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by da...@apache.org on 2016/03/28 12:36:40 UTC
android commit: CB-8582 Obscure INSTALL_FAILED_VERSION_DOWNGRADE
error when installing app
Repository: cordova-android
Updated Branches:
refs/heads/master dd3b9dd01 -> d9814c554
CB-8582 Obscure INSTALL_FAILED_VERSION_DOWNGRADE error when installing app
Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/d9814c55
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/d9814c55
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/d9814c55
Branch: refs/heads/master
Commit: d9814c554298c61f7d6636b92857a3ec6688b90c
Parents: dd3b9dd
Author: daserge <v-...@microsoft.com>
Authored: Wed Mar 16 17:55:08 2016 +0300
Committer: daserge <v-...@microsoft.com>
Committed: Mon Mar 28 13:22:22 2016 +0300
----------------------------------------------------------------------
bin/templates/cordova/lib/Adb.js | 3 +++
bin/templates/cordova/lib/emulator.js | 5 ++++-
2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/d9814c55/bin/templates/cordova/lib/Adb.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/Adb.js b/bin/templates/cordova/lib/Adb.js
index ec3f315..e28c4d9 100644
--- a/bin/templates/cordova/lib/Adb.js
+++ b/bin/templates/cordova/lib/Adb.js
@@ -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));
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/d9814c55/bin/templates/cordova/lib/emulator.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/emulator.js b/bin/templates/cordova/lib/emulator.js
index 28c93f5..0b0c39a 100644
--- a/bin/templates/cordova/lib/emulator.js
+++ b/bin/templates/cordova/lib/emulator.js
@@ -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);
});
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org