diff --git a/bin/templates/cordova/lib/device.js b/bin/templates/cordova/lib/device.js index df2a33cf..a50ac8e2 100644 --- a/bin/templates/cordova/lib/device.js +++ b/bin/templates/cordova/lib/device.js @@ -64,7 +64,7 @@ module.exports.install = function(target) { var apk_path = build.get_apk(); launchName = appinfo.getActivityName(); console.log('Installing app on device...'); - var cmd = 'adb -s ' + target + ' install -r ' + apk_path; + var cmd = 'adb -s ' + target + ' install -r "' + apk_path + '"'; return exec(cmd); }).then(function(output) { if (output.match(/Failure/)) return Q.reject('ERROR: Failed to install apk to device: ' + output); diff --git a/bin/templates/cordova/lib/emulator.js b/bin/templates/cordova/lib/emulator.js index 367cd94a..fe244804 100644 --- a/bin/templates/cordova/lib/emulator.js +++ b/bin/templates/cordova/lib/emulator.js @@ -305,7 +305,7 @@ module.exports.install = function(target) { console.log('Installing app on emulator...'); var apk_path = build.get_apk(); - return exec('adb -s ' + target + ' install -r ' + apk_path); + return exec('adb -s ' + target + ' install -r "' + apk_path + '"'); }).then(function(output) { if (output.match(/Failure/)) { return Q.reject('Failed to install apk to emulator: ' + output);