最终签名的apk输出不适用于所有Android设备

问题描述 投票:-1回答:1

我刚从Android Studio的代码中获得了一个签名版本输出apk。怎么输出不能在所有Android设备上运行!

到目前为止,我测试:它运行良好,安装在索尼Z2(Android 6.0.1),三星J5(Android 6.0.1),j7(Android 6.0.1),甚至在S10 +(android 9)

但是当我想在Sony Z(安卓5.1)上安装它时,它说包装已损坏!或者将apk包发送到huawei Y5设备(android 6.0,EMUI 4.1)之后,手机将该文件表现为ZIP,并显示apk文件的包含而不是安装它。

我绑定从类型1或2更改我的输出类型,但仍然有相同的结果

的build.gradle(模块: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(项目)

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
}
android apk release signed
1个回答
0
投票

最终签名的APK(发布版本)应该安装到使用Google Play商店的设备上,而不是像调试版本那样正常安装。

您应该获得一个Google Play控制台帐户,以便上传已签名的APK,然后允许其他客户端安装它。

© www.soinside.com 2019 - 2024. All rights reserved.