Search code examples
androidapkreleasesigned

Final signed apk output is not working on all android devices


i just got an signed version output apk from my code in Android Studio. How ever the output is not working on all android devices!

till now ,as i test: it's working well and get installed on Sony Z2 (android 6.0.1), Samsung J5 (android 6.0.1) , j7 (android 6.0.1) , even on S10+ (android 9)

but when i want to install it on Sony Z (android 5.1) , it said the package is corrupted ! or after sending the apk package to an huawei Y5 device (android 6.0 ,EMUI 4.1) , the phone behave the file as ZIP, and show the contains of the apk file instead of install it.

i tied to change my output Type from Type 1 o r 2, but still there is same result

build.gradle(Module:app)


android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "ir.eqtech.transport"
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

build.gradle(Project)

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.2'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

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

Solution

  • The final signed APK (release build) should be installed to devices using Google Play Store, not normal install like debug builds.

    You should get a Google Play Console account in order to upload your signed APK and then allow other clients to install it.