[ 
https://issues.apache.org/jira/browse/CB-9557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14714249#comment-14714249
 ] 

ASF GitHub Bot commented on CB-9557:
------------------------------------

Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/209#discussion_r37999874
  
    --- Diff: bin/templates/cordova/lib/device.js ---
    @@ -96,10 +96,15 @@ module.exports.install = function(target, buildResults) 
{
         }).then(function(resolvedTarget) {
             var apk_path = build.findBestApkForArchitecture(buildResults, 
resolvedTarget.arch);
             var launchName = appinfo.getActivityName();
    +        var pkgName = appinfo.getPackageName();
             console.log('Using apk: ' + apk_path);
    -        console.log('Installing app on device...');
    -        var cmd = 'adb -s ' + resolvedTarget.target + ' install -r "' + 
apk_path + '"';
    -        return exec(cmd, os.tmpdir())
    +        console.log('Uninstalling ' + pkgName + ' from device...');
    +        return exec('adb -s ' + resolvedTarget.target + ' uninstall ' + 
pkgName, os.tmpdir())
    --- End diff --
    
    Wouldn't uninstalling always cause a failure - especially on the first run?


> cordova-android fails to install release apk on device if debug version is 
> already installed on device
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-9557
>                 URL: https://issues.apache.org/jira/browse/CB-9557
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>            Reporter: Vladimir Kotikov
>            Assignee: Vladimir Kotikov
>
> *Repro steps:*
> {noformat}
> cordova platform add android
> cordova run android --debug
> cordova-run android --release --buildconfig=somevalidbuildconfig.json
> {noformat}
> *Expected:*
> Both debug and release packages are ran successfully on device/emulator
> *Actual:*
> Release package fails to install with following error:
> {noformat}
> ERROR: Failed to launch application on device:
> ERROR: Failed to install apk to device:
> WARNING: linker: libdvm.so has text relocations. This is wasting memory and 
> is a security risk. Please fix.
>         pkg: /data/local/tmp/android-debug.apk
> Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to