-3

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.

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
Mini Bhati
  • 343
  • 5
  • 20

1 Answers1

2

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

xingjiu
  • 389
  • 3
  • 6
  • Thank you for the answer. This has to be appended in `build.gradle`? – Mini Bhati Apr 18 '18 at 06:41
  • Yes, in build.gradle. merge with your exists `android` config. – xingjiu Apr 18 '18 at 07:22
  • Could you please tell me if LAST_DEBUG_STORE_FILE is a variable or an automatically detected location? Also, now I'll be using the release apk and not the debug one, right? – Mini Bhati Apr 18 '18 at 07:34
  • a variable, You can define it in gradle.properties file at project home folder. like LAST_DEBUG_STORE_FILE =./xxx.keystore. Also, put xxx.keystore into project home. – xingjiu Apr 18 '18 at 09:06