我为屏幕密度配置了多个APK但是在Mi Device上它回滚到以前版本的应用程序

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

为屏幕密度配置多个APK

但是在一些MI设备上,如MI 4和Note 5,它会自动从playstore回滚到以前的版本。

我生成多重密度的代码是

 defaultConfig {
        compileSdkVersion 26
        buildToolsVersion '26.0.2'
        minSdkVersion 16
        targetSdkVersion 26

        versionCode 88
    }

    ext.versionCodes = [all: 1, mdpi: 2, hdpi: 3, xhdpi: 4, xxhdpi: 5]
android.applicationVariants.all { variant ->
    variant.outputs.each { output ->
        def key = output.getFilter(OutputFile.DENSITY) == null ? "all" : output.getFilter(OutputFile.DENSITY)
        output.versionCodeOverride = project.ext.versionCodes.get(key)*100000 + android.defaultConfig.versionCode

    }
}

我已经生成了以前的版本代码,如1000085,2000085,3000085,4000085和5000085

下一个版本将像1000086,2000086,3000086,4000086和5000086

但在Mi设备上,它从playstore获取随机版本apk

android google-play-services apk screen-density
1个回答
0
投票

你可以参考这个thread。由于应用程序的大小,您的应用可能与您的设备不兼容。

谢谢你的留言。目前,上传到Google Play的应用的最大文件大小限制大约为50 MB。

但是,某些设备的缓存分区可能小于50 MB,因此用户无法下载该应用程序。例如,一些HTC Wildfire设备已知具有35-40 MB的缓存分区。如果Google Play能够识别此类设备没有足够大的缓存来存储应用,则可能会将其过滤为用户显示。

如果有帮助,您也可以查看此链接:android app automatically downgrade version

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