How to Sign Android App to avoid App not installed from Play Store error?

56 Views Asked by At

I'm trying to release new update to my users on play store, but whenever I roll out the release all users complaint me about app is not updating or not installing after downloading update from play store.

How do I configure my gradle / manifest / or build settings such that users will successfully install the new update without needing to uninstall the existing apk from the device?

Please correct me if my settings are configured incorrectly.

build.gradle(app)

android {
    compileSdkVersion 31
    defaultConfig {
        applicationId "com.myapp"
        minSdkVersion 23
        targetSdkVersion 31
        versionCode 11
        versionName "2.2.0"
        multiDexEnabled true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        signingConfig signingConfigs.debug
    }

    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            debuggable true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.debug
        }
        debug {
            signingConfig signingConfigs.debug
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    bundle{
        language{
            enableSplit=false
        }
    }
}

build.gradle(project)

allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
        mavenCentral()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

proguard-rules.pro

-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
-keepattributes Signature
-keep class androidx.appcompat.widget.** { *; }
-keepclassmembers class com.myapp.Firebase** { 

      *;
    }

I'm not able to understand which part of the mentioned code having issues with. Sometimes my build takes so much time during running app for testing on device. I new in this signing process. I will really appreciate your help.

0

There are 0 best solutions below