androidcordovasapui5sap-smp

Built apk is not getting updated after updating to newer Cordova and SMP versions


I'm building a hydrid (Kapsel) mobile application using SMP and Cordova for Android. The production apk is deployed via Airwatch to the customers.

The app was initially built on SP07 and Cordova 4.2.1.
Now, I'm trying to upgrade the technology stack to SP14 and Cordova 6.3.1.

However, I'm facing issues while updating the application on the previous version. The initial production (release) was a debug apk. But now, when I'm installing the updated apk, it is showing some build signature conflict issues. The package name is the same and the version code is incremented.

The earlier app was a debug apk and I'm also generating the debug apk. Still, the app is not installed on the previous one.


Solution

  • First, App update must have the same signature as the last installed version.

    Second, Android will generate a debug keystore auto for the debug build. And a user generates release keystore for the release build.

    Then, what you need to do is find out last debug keystore (usually at ~/.android/debug.keystore) with default key-password android and alias androiddebugkey. And set the debug keystore to be the release keystore.

    android {
        signingConfigs {
            release {
                storeFile file(LAST_DEBUG_STORE_FILE)
                storePassword 'android'
                keyAlias 'androiddebugkey'
                keyPassword 'android'
            }
        }
    }
    

    Last: you can check the keystore by

    keytool -list -keystore debug.keystore
    

    password: android